Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

•Please don't use foo && truething || falsething

by merlyn (Sage)
on Jul 30, 2002 at 14:50 UTC ( [id://186219]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    
    my $key = $institution
              && ($valid_institution{lc($institution)} || "other")
              || "unaffiliated";
    
  2. or download this
    ## I'm promising that the true branch here can NEVER EVER EVER
    ## return a false value, which would have caused the
    ...
    ## updating this code, please continue to maintain
    ## this precondition, which I have placed precariously
    ## and needlessly in this code. Have a nice day.
    
  3. or download this
    my $key = $institution
              ? ($valid_institution{lc($institution)} || "other")
              : "unaffiliated";
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others cooling their heels in the Monastery: (4)
As of 2024-04-25 05:59 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found