in reply to TIMTOWTDI Challenge: Create a filename

For creating not-yet-existing filenames, File::Temp is surely the weapon of choice if it has to be robust.

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).