2.8.3. Discussion
The Perl build process tries to find the best C-library routine to
use for generating pseudo-random numbers, looking at
rand(3), random(3), and
drand48(3). (This can be changed manually at
build time, however.) The standard library functions are getting
pretty good, but some ancient implementations of the
rand function return only 16-bit random numbers or
have other algorithmic weaknesses, and may therefore not be
sufficiently random for your purposes.
The Math::TrulyRandom module uses inadequacies of your system's
timers to generate the random numbers. This takes a while, so it
isn't useful for generating a lot of random numbers.
The Math::Random module uses the randlib library
to generate random numbers. It also includes a wide range of related
functions for generating random numbers according to specific
distributions, such as binomial, poisson, and exponential.