Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
sub MakeID { # Seed the random generator srand($$|time); $sessionID=int(rand(60000)); # pack the time, process id, and random $session into a # hex number which will make up the sessin ID $session=unpack("H*", pack("Nnn", time, $$, $session)); return $session; } #Make ID
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
RE: Simple Session?
by merlyn (Sage) on May 03, 2000 at 18:39 UTC | |
by Dominus (Parson) on Apr 13, 2001 at 22:01 UTC | |
|
Re: Simple Session?
by lhoward (Vicar) on May 03, 2000 at 17:36 UTC | |
|
Re: Simple Session?
by turnstep (Parson) on May 03, 2000 at 17:08 UTC |