http://qs321.pair.com?node_id=195155


in reply to Generating Repeatable Pseudorandom Sequences

The default behavior for srand (in newer perls) is to try to give you something much less guessable (via /dev/urandom or a combination of the time, process id, and "some other things.")

You don't need to call it (with newer perls) because it is called the first time you call rand().

If you want the same pseudorandom sequence repeatedly, you can get it by repeatedly seeding the generator with the same value. In other words, srand(1); print rand(3) will always print the same value.

-sauoq
"My two cents aren't worth a dime.";