Hi,
I am working on a couple of scripts for word processing/counting. One of them involves a hashmap, which could have around 41 million keys in the worst case. The trouble is that while running the script always runs out of memory. I cant flush the hashmap at some intervals because all the information in that is necessary. Is there some solution to this?
I am posting a snippet of my code below:
while(<FH4>) {
if(exists $wordCount{$_}) {
$wordCount{$_} = $wordCount{$_} + 1;
}
else {
$wordCount{$_} = 1;
<FH4> can contain around 41 million lines on an average.