http://www.perlmonks.org?node_id=984649


in reply to Windows 7 Remove Tabs Out of Memory

You put a 500 MB file RAM. The regexp is going to be some multiple of the file size. Maybe there is some way to stop the regexp from "backtracking" to lower the peak of ram required for the regexp engine. This is the more complicated fix.

The other choice is process the file by fixed blocks (512 KB or so) or with line buffered IO ("<FILE>") in a loop.

Choice 3 is to try tr operator which is NOT a regexp.
  • Comment on Re: Windows 7 Remove Tabs Out of Memory