http://www.perlmonks.org?node_id=1050169


in reply to Random Number Generator

What made you think the rand function is time based?

Try adding srand(1000) to the start of your code and see what happens. You're just wasting time with those usleeps.

Designing a good random number generator isn't easy, so it's better to use one of the RNG modules that has been properly tested. see rand for some suggestions.

The maths behind random number generators and their proper testing is really interesting and well worth some study, if you have the time.