print "Question #1: Who is buried in Grant's tomb?\n\n"; print "A. Grant\n"; print "B. Yoda\n"; print "C. Liberace\n"; print "D. None of the above.\n\n\n\n"; print "The answer is: "; chomp($reply = ); #Following loop to test for a-d answers, courtesy of PerlMonks.org. #This works but will not accept any answer without going thru this #code block once print "\nPick a letter between a and d.\n"; chomp(my $reply = ); while ($reply !~ /^[a-d]$/i) { print "\nPick a letter between a and d -- or else!\n"; chomp($reply = ); }