Help for this page

Select Code to Download


  1. or download this
    unless ( $result = my_sub() ) {
       # handle error condition
    }
    
  2. or download this
    my $result;
    unless ( my_sub(\$result) ) {
       # handle error condition
    }
    
  3. or download this
    sub my_sub {
       my $r_result = shift;
       $$r_result = whatever();
       was_there_an_error() ? 0 : 1 ;
    }