Every time you run your program you get the same set of "random" numbers. You want Perl to produce different random numbers each time. This is important in nearly every application of random numbers, especially games.
Making random numbers is hard. The best that computers can do, without special hardware, is generate "pseudo-random" numbers, which are evenly distributed in their range of values. These are generated using a mathematical formula, which means that given the same seed (starting point), two programs will produce identical pseudo-random numbers.
If you haven't called
srand( <STDIN> );
Just because Perl tries to use a good default seed does not necessarily guarantee that the numbers generated are cryptographically secure against the most intrepid crackers. Textbooks on cryptography are usually good sources of cryptographically secure random number generators.
Copyright © 2002 O'Reilly & Associates. All rights reserved.