# my $num2 = getNumberBetweenXandY(1, 5); # Change this... my $num2 = getNumberBetweenXandY(1, 9 - $num1); # Into this.