sub test { my $a = shift; my ($first, $second, $third, $fourth, $fifth) = $a =~ /(.)(.)(.)(..)(.+)/; return 0 if ($first !~ /(a)/); return 0 if ($second !~ /(d|p|t)/); return 0 if ($third !~ /(a|h|r|s|t)/); return 0 if ($fourth !~ /(aw|er|dd|cb|aa)/); }