laziness, impatience, and hubris | |
PerlMonks |
Re (tilly) 3: More efficient munging if infile very largeby tilly (Archbishop) |
on Jul 26, 2001 at 16:16 UTC ( [id://99953]=note: print w/replies, xml ) | Need Help?? |
Change the foreach to a while. The difference is that foreach puts the file read into list context so the entire file has to be held in memory. The while prints as it reads and so will work much better on large files. Otherwise I like your changes.
In Section
Seekers of Perl Wisdom
|
|