in reply to "unique" filename?

I use the following, which seems to work well (though results in some horribly long file names).
my $outfile = localtime; print "$outfile\n"; $outfile=~s/\s|://g; $outfile="$outfile" . rand($outfile); $outfile=~s/\.//g; #for win32 - doesn't like multiple dots print $outfile;