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/) {
In reply to Re: If Statements and Regular Expressions
by pjotrik
in thread If Statements and Regular Expressions
by TempAcolyte
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |