in reply to out of memory error while reading file contents into an array
If you don't have space to hold the entire file in memory, then don't read in the entire file - process line by line.
open (IN, filename) or die "cann't open file filename : $!\n"; while (defined(my $line = <IN>)) { #process $line } close (IN);
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: out of memory error while reading file contents into an array
by psr473 (Novice) on Aug 12, 2009 at 11:41 UTC |