Help for this page

Select Code to Download


  1. or download this
    perl -MO=Deparse -e "sub test { return int(rand(2)) or print 'Nope' }"
    sub test {
        print 'Nope' unless return int rand 2;
    }
    -e syntax OK
    
  2. or download this
    my $result;
    $result = something() or croak "Something went wrong";
    return $result;
    
  3. or download this
    sub mySub
    {
      ...
      something() or croak "Times are a'croaking";
    }