in reply to Memory usage while tallying instances of lines in a .txt file
This is because you're reading the entire file into an array. To reduce the memory footprint, you're better off reading the file a line at a time.
Can you please show us an example of the line you're doing this on?:
my $index = first{$headers[$_] eq 'Strand'} 0..$#headers;
We should be able to help you rewrite your code if we know where $index is being gleaned from.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Memory usage while tallying instances of lines in a .txt file
by TJCooper (Beadle) on Dec 05, 2016 at 17:25 UTC | |
by stevieb (Canon) on Dec 05, 2016 at 17:59 UTC | |
by TJCooper (Beadle) on Dec 05, 2016 at 18:42 UTC |