in reply to Re: Putting files in an Array
in thread Putting files in an Array

First of all it won't work to save memory by reading a file line by line if you then store it into an array anyway.

Sorry if I was misleading. In the original post, IIRC, he complained about filtering 2 gig files. The ARGV trick pushed matches into a @results array, and unless he had 2 gig's worth of matches, he should not run out of memory. In this node, he seems to want to slurp all lines into the array. I think that caused confusion, because in this node he wanted to use the ARGV trick on small files.


I'm not really a human, but I play one on earth.
Old Perl Programmer Haiku ................... flash japh