$tempdir = tempdir( $template, CLEANUP => 1); Create a temporary directory using the supplied template, b +ut attempt to remove it (and all files inside it) when the pro +gram exits. Note that an attempt will be made to remove all file +s from the directory even if they were not created by this module +(other- wise why ask to clean it up?). The directory removal is mad +e with the rmtree() function from the File::Path module. Of cours +e, if the template is not specified, the temporary directory will + be cre- ated in tmpdir() and will also be removed at program exit.
-- Randal L. Schwartz, Perl hacker
Be sure to read my standard disclaimer if this is a reply.
In reply to Re: Automatically deleting selected directories on program exit
by merlyn
in thread Automatically deleting selected directories on program exit
by eyepopslikeamosquito
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |