in reply to Perl script end up on saying "Out of Memory !"
Question : How can I erase or clear the hash before my perl script takes the second file ?
The simplest way is to declare it in such a way that it goes out of scope when you stop processing the file. Something along the lines of:
for my $filename (@files) { my %data1; # do all processing of file $filename here }
Alternatively you can use undef %data1
my %data1 = %$list_a_ref; # Dereference lists
That doesn't just dereference, it also creates a copy. Do you want that?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Perl script end up on saying "Out of Memory !"
by syedumairali (Initiate) on Sep 20, 2011 at 10:38 UTC | |
by moritz (Cardinal) on Sep 20, 2011 at 11:38 UTC | |
by syedumairali (Initiate) on Sep 20, 2011 at 16:18 UTC | |
by moritz (Cardinal) on Sep 21, 2011 at 05:14 UTC |