http://www.perlmonks.org?node_id=891078


in reply to Help Diagnosing Memory Leak

Maybe the issue is the combination of closures and your version of Perl (5.8.2)? One of the bugs apparently involved creating closures within named subroutines. That and many other closure related memory leaks weren't fixed until 5.8.4, and in some cases perhaps until 5.9.x - See Perl Porters: Do Nested Closures still leak memory?