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


in reply to Re: Eating RAM problem
in thread Eating RAM problem

Chromatic, I need to get each element into an array. If the file size is 2 million bytes, then the array should have 2 million elements. How can I do that without draining RAM? Using your sub I get:
@blah = by_string($file); $i = 0; foreach(@blah){ $i ++; } print $i; # Prints 1... not what I am looking for
Thanks