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


in reply to Memory issue with Hash

If you really need to reclaim memory from a big hash, fork off the code, and let the fork do the work. When the fork's pid is terminated, all memory will be returned to the OS. It is a little more complicated to fork things off, but you get complete control over memory being returned.

See Parallel::ForkManager and IO::Pipe for some helpful modules.


I'm not really a human, but I play one on earth.
Old Perl Programmer Haiku ................... flash japh