in reply to Re^2: Need to Generate Unique String
in thread Need to Generate Unique String

use Digest::MD5; $pretty_darn_close_to_unique = md5_hex(md5_hex(time() . $$ . rand . {} +));

-stvn

Replies are listed 'Best First'.
Re^4: Need to Generate Unique String
by BrowserUk (Patriarch) on Jul 29, 2004 at 20:32 UTC

    I love the subtle inclusion of a memory reference.


    Examine what is said, not who speaks.
    "Efficiency is intelligent laziness." -David Dunham
    "Think for yourself!" - Abigail
    "Memory, processor, disk in that order on the hardware side. Algorithm, algoritm, algorithm on the code side." - tachyon
      I love the subtle inclusion of a memory reference.

      I would love to take credit for that, but fact is I ripped it off from Apache::Session::Generate::MD5. Its a nice one, I have used it (the extracted code, not the module) for a while as a session id generator and it has worked out quite well.

      -stvn