rand - retrieve the next pseudorandom number
rand EXPR
rand
Returns a random fractional number greater than or equal to 0
and less than the value of
EXPR.
(EXPR should be positive.) If
EXPR is omitted, the value
1
is used. Automatically calls srand() unless
srand() has already been called. See also srand().
(Note: If your rand function consistently returns numbers that are too large or too small, then your version of Perl was probably compiled with the wrong number of RANDBITS.)
If rather than formatting bugs, you encounter substantive content errors in these documents, such as mistakes in the explanations or code, please use the perlbug utility included with the Perl distribution.