Sure, you can make that criticism. But if you think about it, when you read the files in directory order, as long as you don't sort the files, you'll get them in the order they were created. Therefore, appending a random number is a perfectly acceptable method of generating the unique file names. Except for the small possibility of getting the same filename...
Comment on Re^5: Unique filenames with Time::HiRes
when you read the files in directory order, as long as you don't sort the files, you'll get them in the order they were created.
I think you're making a huge assumption there about the filesystem. perldoc -f readdir and man 3 readdir say nothing about the order of the directory entries they give you.