in reply to TIMTOWTDI Challenge: Create a filename
A typical usage is just
use File::Temp qw(tempfile); my ($handle, $name) = tempfile();
That protects you from race conditions, so for example if you have a test suite that uses temporary files, and somebody runs them in parallel, it doesn't all blow up.
The downside is the names aren't pretty (although you can provide a template to make it start pretty at least).
|
|---|