use strict; my $target = 12; print "Guess my number.\n"; #my $guess = ; # Attempt 2 with the "next" statements below commented out. This failed also. print "Enter your guess: "; #my $guess = ; Attempt 1 worked but had to enter the guess a second time on a new line before processing my $guess; while ( $guess = ) { if ($guess == $target) { print "You guessed it!"; last; }elsif ($guess > $target) { print "Your guess is too high.\n"; #next; # Attempt 1 using this failed. }elsif ($guess < $target) { print "Your guess is too low.\n"; #next; # Attempt 1 using this failed. } print "Enter your guess: "; }