use strict; use warnings; my $snpFile = <; close $snpIn; # Perform the search and report open my $mapIn, '<', \$mapFile or die "Can't open map file: $!"; /^(\w+)\s+(\w+)/ and exists $snpLookup{$1} and print "$1 $2\n" while <$mapIn>; close $mapIn; #### rs7837688 NP_817124 rs10499549 ZMYND11 rs3749375 ZMYND11