Random Numbers in Perl

Top Page
Attachments:
Message as email
+ (text/plain)
Delete this message
Reply to this message
Author: George Gambill
Date:  
Subject: Random Numbers in Perl
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: [mailto:sinck@ugive.com]
Sent: Monday, October 23, 2000 7:51 AM
To:
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