my $low = 1; #Current low limit
my $high = 1000; #Current high limit
#This is the secret number...Add one because we
#don't need to wind up with a zero now do we?
my $goal = int(rand($high))+1;
####
my $goal = int(rand($high-$low+1))+$low;
####
my $low = 7;
my $high = 9;
sub original { int(rand($high))+1 }
sub fixed { int(rand($high-$low+1))+$low }
($,,$\)=(" ","\n");
print "Random numbers between $low and $high.";
print "original:", map original(), 1..20;
print " fixed:", map fixed(), 1..20;
####
Random numbers between 7 and 9.
original: 9 7 1 5 3 9 9 6 7 1 3 5 2 4 7 6 7 3 4 8
fixed: 9 7 9 7 7 8 7 9 7 7 8 8 9 7 8 8 7 9 8 9