in reply to memory issues
The problem is that this line:
if($ipairs{$fk}{$pair}{'pvalue'}){
Rather that just testing if that value exists, it is autovivifying (creating) that value in the nested hashes and setting it to null.
If you change that line to:
if( exists $ipairs{$fk} && exists $ipairs{$fk}{$pair} && exists $ipairs{$fk}{$pair}{'pvalue'} ){
It should prevent the runaway memory growth. As a nice side-effect, your program should run substantially faster also.
BTW. I assume you mean 32GB not 32MB?
With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.
In Section
Seekers of Perl Wisdom