But this way vou have to read the big file often. As supposed above it would be better, to switch the while loops.
untested:
while(<FILE>) { chomp; my ($objid,$other) = split(/\s+/,$_); while(my ($key,$value)= each (%hash_table)) { if($objid =~ /$key/i) { print "$key is present in $objid\n"; } else { next; } } }
In reply to Re^2: Hash/file --> doesn't seem to work
by Crian
in thread Hash/file --> doesn't seem to work
by imrags
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |