http://qs1969.pair.com?node_id=794212


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