Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re^2: the try/catch example from "Programming Perl" analyzed

by adrianh (Chancellor)
on Aug 19, 2004 at 13:05 UTC ( #384273=note: print w/ replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    sub exception (;$) { 
        my $wanted_exception = shift;
    ...
        return 1 unless defined $wanted_exception;
        return ref($@) && $@->isa( $wanted_exception )
    };
    
  2. or download this
        eval { $coderef->() };
        if ( exception 'IOException' ) {
    ...
        } else {
            ... we lived ...
        };
    

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://384273]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (8)
As of 2016-06-29 19:18 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My preferred method of making French fries (chips) is in a ...











    Results (386 votes). Check out past polls.