Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re: Re: Style Point: Catching eval { } errors

by dref (Novice)
on Nov 28, 2003 at 12:29 UTC ( #310710=note: print w/ replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    sub try (&@) {
      my($code, $error_handler) = @_;
    ...
    sub catch (&) {
      return @_;
    }
    
  2. or download this
    my $msg;
    try {
    ...
      print "File could not be opened because of: $@\n";
      $msg = "BAAAAH";
    }
    

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (9)
As of 2015-03-31 06:11 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    When putting a smiley right before a closing parenthesis, do you:









    Results (660 votes), past polls