Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re: gernerating unique string

by broquaint (Abbot)
on Sep 19, 2001 at 20:18 UTC ( #113389=note: print w/replies, xml ) Need Help??


in reply to gernerating unique string

You could use some high resolution time -
use Time::HiRes qw(gettimeofday); $id = gettimeofday();
or if you've got time on your hands -
use Digest::MD5 qw(md5_hex); use Time::HiRes qw(gettimeofday); $id = md5_hex(gettimeofday());
Although you'll may have to download them from CPAN (here's Digest::MD5 and Time::HiRes)
HTH

broquaint

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (4)
As of 2022-08-19 07:31 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?