Perl Language Randomness Generate a random number between 0 and 100


Example

Pass an upper limit as an argument to the rand() function.

Input:

my $upper_limit = 100;
my $random = rand($upper_limit);

print $random . "\n";

Output:

A random floating-point number, like...

45.8733038119139