Help for this page

Select Code to Download


  1. or download this
    use warnings;
    use strict;
    ...
        # simulate a fail
        return 0;
    }
    
  2. or download this
    eval { blah() or die "failed"; };
    
    if ($@){
        ...
    }
    
  3. or download this
    if ($@ =~ /timeout/){
        ...
    }