http://qs321.pair.com?node_id=655423


in reply to Reading huge file content

As other had said - not a good idea, better to pass the filename or maybe record by record through a pipe?

On the memory issue, adding RAM may not help if you are only on a 32-bit machine or OS. The largest address on 32-bit is (2**32)-1, which gives a process address space of 4GB. Of this the kernel reserves a sizeable chunk - up to half (2GB) on some operating systems. Then you have the run-time libraries, perl itself, etc. using up address space. A 64-bit machine (in theory) has a limit of 16-Exobytes.

Then some operating systems (Windows) pre-allocate the heap-size at compilation time, which by default is only 1MB on Visual Studio. There are ugly hacks around this limit, but I doubt perl employs them.

Back to the drawing board I think.