in reply to Re^4: Unique filenames with Time::HiRes in thread Unique filenames with Time::HiRes
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...
Re^6: Unique filenames with Time::HiRes
by DrHyde (Prior) on Jul 20, 2004 at 08:09 UTC
|
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. | [reply] [d/l] [select] |
|