in reply to Loading Large files eats away Memory
open(FILE,'myfile') or die $!
I haven't checked the module suggested by BrowserUK but I tried this -
my $i = 0; $l_Data[$i++] = $_ while (<FILE>);
By reading the file line by line and populating the array uses only 45Megs.
If it is not too complicated then you can give us some idea on why you need to load the file into memory. For example, most statistics based algorithms can be implemented such that you don't have to keep the entire file in memory
cheers
SK
|
|---|