Re: Sinister variable caching problem with rand()

Michael Ludwig <[email protected]>
Newsgroups gmane.comp.apache.mod-perl
Message-ID <20100516092846.GA5264@wladimir>
André Warnier schrieb am 15.05.2010 um 22:47:14 (+0200):

> A tip : to get a really unique identifier, I often use
> "yyyymmddhhmmssrrrrr", where rrrrr is the rand() result,
> and the prefix is the date/time. Unless you process more
> than 99,999 requests per second, it will always be unique.

I'm probably missing something trivial, but how do you
enforce uniqueness over rrrrr for 99,999 consecutive calls
to rand?

The perldoc doesn't promise any uniqueness, only randomness,
which isn't uniqueness.

-- 
Michael Ludwig
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.