programming-examples/perl/SystemFunction/Generate random numbers.pl
2019-11-15 12:59:38 +01:00

8 lines
357 B
Perl

#!/usr/bin/perl
print "Content-Type: text/html \n\n";
$random_number = rand(10);
print "<p>Your Auto Lucky Number from 1 to 10 is $random_number.</p>\n";
$random_integer = int(rand(10)) + 1;
print "<p>Your Auto Lucky Integer from 1 to 10 is $random_integer.</p>\n";
print "Click the Reload button on your browser to get a new random number.";