in reply to If Statements and Regular Expressions
In the line if ($Gene_Symbol =~ /Hox/) {, $Gene_Symbol still has the value it had in the last round of the while loop; it is in no way affected by the foreach loop. What you probably want is to match against the value that you stored in the %symbols hash for every key. That is,
if ($symbols{$key} =~ /Hox/) {
|
|---|