Of course "srand" seeds "rand". And yes, it is a good way to generate random numbers for a one time application RUN. CGI on the other hand could pose a problem, as stated in the "Programming in PERL" book.
Salutations - RB -----Original Message----- From: Paul Johnson [mailto:[EMAIL PROTECTED]] Sent: Tuesday, April 30, 2002 4:35 PM To: Perrin Harkins Cc: OCNS Consulting; David Jacobs; [EMAIL PROTECTED] Subject: Re: Cheap and unique On Tue, Apr 30, 2002 at 04:08:00PM -0400, Perrin Harkins wrote: > OCNS Consulting wrote: > >Check your "Programming in PERL" book. Specifically, the "srand" function. > > 'random' ne 'unique' > > A random function could return the same number 10 times in a row. It's > very unlikely, but it could happen. That's the definition of random. 'srand' ne 'rand' :-) I suspect that Mr or Mrs Consulting was thinking about the seed to srand that used to be required. Not to say that that is a good solution to this problem though. -- Paul Johnson - [EMAIL PROTECTED] http://www.pjcj.net