GetOptions ( 'sub' => \&a ) @aminos= qw (A R N D C Q E G H I L K M F P S T W Y V B Z X); sub a { if( "$substr1$substr2" =~ /[^@aminos]/ ) { print "hello\n"; } print "@aminos\n"; }