in reply to Re: Re: More efficient munging if infile very large
in thread More efficient munging if infile very large

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.

  • Comment on Re (tilly) 3: More efficient munging if infile very large