Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re: Perl Idioms Explained - && and || "Short Circuit" operators

by Abigail-II (Bishop)
on Oct 22, 2003 at 21:31 UTC ( #301380=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    ---------------------------------------------------------
    $this && $that   |    If $this is true, and $that is true
    ...
                     |    If $that evaluates true, return 
                     |    the value of $that.
    ---------------------------------------------------------
    
  2. or download this
    ---------------------------------------------------------
    $this && $that   |    If $this is true, return $that,          
    ...
    $this || $that   |    If $this is true, return $this,
                     |    else return $that.
    ---------------------------------------------------------
    

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://301380]
help
Chatterbox?
[choroba]: talking about golfing, I did Pascal's triangle in 51 characters ;-)
[choroba]: and 99 bottles of beer in 217

How do I use this? | Other CB clients
Other Users?
Others wandering the Monastery: (6)
As of 2017-10-22 20:10 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My fridge is mostly full of:

















    Results (275 votes). Check out past polls.

    Notices?