in reply to how much memory each Perl variable uses
Ignoring the more useful question about debugging, might this be your root problem?
memory consumption
memory consumption
In Section
Seekers of Perl Wisdom
in reply to how much memory each Perl variable uses