Help for this page
use Math::Random::MT qw[ srand rand ]; use POSIX qw[ frexp ]; ... my $rv = int( $rand * ( $max / 2**$exp ) ); ## Update: Less roundo +ff }