Help for this page

Select Code to Download


  1. or download this
    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;
    
  2. or download this
    if ($answer =~ /^P/i) {
      ## Code for P here
    ...
      ## No need to check the final letter
      ## Code for Q here
    }