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


in reply to END block not excuting when thread interrupted

I don't have any helpful advice for threaded programming, but would you have any better luck using a pre-existing solution, and using File::Temp for your temp directory?
use File::Temp qw/ tempfile tempdir /; $dir = tempdir( CLEANUP => 1 );