D
Derek Fountain
In any recent version of Perl, the seed for the random number generator is
set at the first time rand() is called. Can I find out what that seed is so
I can subsequently reproduce the random sequence?
At present I'm setting my own seed using "time ^ ($$ + ($$ << 15))", but my
program is being run repeatedly over and over, and only takes a fraction of
a second to do its job. That means time is often the same for several runs,
and $$ tends to go up in small, sometimes single, steps. I have my
suspicions about the quality of my seed!
set at the first time rand() is called. Can I find out what that seed is so
I can subsequently reproduce the random sequence?
At present I'm setting my own seed using "time ^ ($$ + ($$ << 15))", but my
program is being run repeatedly over and over, and only takes a fraction of
a second to do its job. That means time is often the same for several runs,
and $$ tends to go up in small, sometimes single, steps. I have my
suspicions about the quality of my seed!