Re: Rand on win2k

2001-04-26 Thread Cameron Dorey

Eric Mosley wrote:
 
 Hi,
 
 Whats the best way to seed the random number generator on Win2000?

Just let Perl do it for you. see perlfunc in the docs on your hard disk.

BTW, please quote only the relevant part of the message you are replying
to, and it makes it easier to read if you put your reply underneath
(i.e. in proper chronological sequence). Remember, some people get this
list in digest form and a lot of long-quoting replies just serve to make
that digest so much longer.

Cameron

-- 
Cameron Dorey
Associate Professor of Chemistry
University of Central Arkansas
Phone: 501-450-5938
[EMAIL PROTECTED]
___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users



Re: Rand on win2k

2001-04-26 Thread Philip Newton

Eric Mosley wrote:
 Whats the best way to seed the random number generator on Win2000?

If you're using a Perl version 5.004 or later, nothing.

rand() calls srand() automatically the first time it's used, supplying a
semi-random value supplied by the kernel (if it supports the /dev/urandom
device) or based on the current time and process ID, among other things.
I'd say that's pretty good without trying to come up with a decent srand()
seed yourself.

Cheers,
Philip
-- 
Philip Newton [EMAIL PROTECTED]
All opinions are my own, not my employer's.
If you're not part of the solution, you're part of the precipitate.
___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users