in reply to Automatically deleting selected directories on program exit
$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.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Automatically deleting selected directories on program exit
by eyepopslikeamosquito (Archbishop) on May 16, 2005 at 05:03 UTC |