for/foreach (<$fh>) is generally a bad idea - it implies slurping the file and creating a list of lines internally. Better is to use a while (<$fh>) loop. In both cases the loop body handles things a line at a time, but while is a better semantic match and is likely to be much more memory (and possibly slightly more time) efficient.
In reply to Re^2: Need help with comparison code
by GrandFather
in thread Need help with comparison code
by sowais
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |