Add some debugging prints (print STDERR ... preferably, as you're manipulating the default output file handle) to figure out what's different from the sample I've given (which does work fine for me).
For example, print the records ($_), $name, the corresponding hash values $hash{$name}, etc. Are they what you'd expect?
In reply to Re^3: Compare hash with arrays and print
by almut
in thread Compare hash with arrays and print
by ad23
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |