Help for this page
do { print "\nDid I guess your animal?\n\n"; ... do { print "\nDo you want to <P>lay again or <Q>uit?\n\n"; } while ($answer=<STDIN>) !~ /^[PQ]/i;
if ($answer =~ /^P/i) { ## Code for P here ... ## No need to check the final letter ## Code for Q here }