Beefy Boxes and Bandwidth Generously Provided by pair Networks Bob
Do you know where your variables are?
 
PerlMonks  

Re: Why I Hate Nested If-Else blocks

by dws (Chancellor)
on Jan 04, 2002 at 02:33 UTC ( #136125=note: print w/ replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
      if ( ! ref $_[0] ) {
          return undef;
      } else {
          blah($_[0]);
      }
    
  2. or download this
      return undef unless ref $_[0];  # guard clause
    
      blah($_[0]);
    

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (13)
As of 2014-04-17 14:53 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    April first is:







    Results (450 votes), past polls