Help for this page

Select Code to Download


  1. or download this
    die unless ( $answer eq 'Y' or 'y' );
    
  2. or download this
    die unless (  ($answer eq 'Y') or ('y')  );
    
  3. or download this
    $ perl -MO=Deparse,-p -e  'die unless ( $answer eq "Y" or  "y");'
    ((($answer eq 'Y') or 'y') or die);
    -e syntax OK
    
  4. or download this
    > my $answer = "y";
    y
    ...
    > say "true" if $answer eq 'N' | 'n';
    Nil
    >