in reply to Sort taking a long time to clean up
Dave.
As you note there is/was a malloc bug that led to slow destruction of big data structures. A workaround is:
use POSIX; # code here POSIX::_exit(0); [download]
This skips the normal perl clean up and leaves it to the OS.
cheers
tachyon