
FishMonger
Veteran
Apr 3, 2009, 6:47 AM
Views: 2713
|
|
Re: [koti688] Memory issue while opening and reading a file
|
|
|
can i dod this way my (@keys, @values); open(TEST,"<$sigDataFile") || die("This file will not open!"); while(<TEST>) { my ($key,$value)=split /=/; push @keys,$key; push @values,$value; } close(TEST); print @keys; print @values; That sill puts your entire file into memory, but now you're using 2 arrays instead of 3. The only advantage is that you're not duplicating the data. What do you need to do with the data?
(This post was edited by FishMonger on Apr 3, 2009, 6:48 AM)
|