Just change your 'for' to 'while'
...because for would slurp your file into memory,
whereas while only reads it line by line.
It's mentioned in perldoc perlintro
Update: bummer, it isn't mentioned there. And so certain was I...
Cheers, Sören
In reply to Re^2: Large file problem
by Happy-the-monk
in thread Large file problem
by JohnBrook
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |