Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Re^5: Unique filenames with Time::HiRes

by beable (Friar)
on Jul 19, 2004 at 08:32 UTC ( [id://375490]=note: print w/replies, xml ) Need Help??


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...
  • Comment on Re^5: Unique filenames with Time::HiRes

Replies are listed 'Best First'.
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.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://375490]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others admiring the Monastery: (3)
As of 2024-04-25 05:48 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found