>perl my $answer = 42; { print "What is the answer? "; chomp( my $input = ); if ( $input == $answer ) { print "Good!\n"; } else { print "Please try again.\n"; redo; } } __END__ What is the answer? 1 Please try again. What is the answer? 2 Please try again. What is the answer? 42 Good!