in reply to Re^2: Out of Memory
in thread Out of Memory

I agree.

Let me share my experience on a problem that OP raised.
Usually at work, when I need some transformation, I often write small and quick program that slurps entire file and uses regexp to produce a result.
this works and I use such a program from time to time.
then, this program fed with a file of ten or hundred Mbytes (which is no more rare nowadays) and I go to my initial program and optimize it so it could rpocess such files.

Actually - I think - it is quite common situation.

There's no need to write a very optimal and highly structured program from the very beginning - "dirty hack" suffice as a first step, and then incremental improvements could be made, if needed - the point - they could never be needed :)
Fortunately, perl is powerful enough to allow such an approach.