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

Re: Re: Re: Idomatic Handling of Subroutine Error

by dragonchild (Archbishop)
on Sep 18, 2001 at 23:35 UTC ( [id://113183]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    # MAIN
    unless ($result = my_sub() ) {
    ...
        # For example ...
        die "Bad data passed in.\n";
    }
    
  2. or download this
    # MAIN
    if (defined ($error = my_sub()) ) {
    ...
        # For example ...
        die "Bad data passed in.\n";
    }
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others avoiding work at the Monastery: (6)
As of 2024-04-18 02:18 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found