in reply to Unique filenames in a shared directory (The Kitchensink)

If you are on a really fast and busy machine that may reuse the id within a second just add.
use Time::HiRes qw/time/;
On my machine that adds 6 decimal places to the time, just try to repeat the combination with that.