POSIX already provides for temporary file names, namely tmpfile() and tmpnam()- you should be using these- they are implemented in File::Temp which includes mechanisms to create new temporary directories. These are far safer than specifying dates or times in the filenames- and POSIX-compatible! (three cheers for POSIX!)