Random Numbers in Perl

George Gambill ggambill@computer-guidance.com
Mon, 23 Oct 2000 16:47:52 -0700


Some systems suggest using the rand() function with a negative seed causing
the system to get the seed from the computer clock.  Then they recommend
subsequent rand() function calls without a seed.  You may want to play with
this.  I have always considered it good enough.  YMMV

-----Original Message-----
From: sinck@ugive.com [mailto:sinck@ugive.com]
Sent: Monday, October 23, 2000 7:51 AM
To: plug-discuss@lists.PLUG.phoenix.az.us
Subject: Re: Random Numbers in Perl



This is an excellent go, and I'll only make one kibbitz technically:

\_         $randigit = int( rand( $base) );

Do you trust rand() to be random?

It's probably mostly random as far as humans can tell, but computers?
rand('maybe', 'maybe not').  :-)

David