Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re: Or Operator

by VSarkiss (Monsignor)
on Jul 31, 2004 at 16:46 UTC ( #378940=note: print w/ replies, xml ) Need Help??


in reply to Or Operator

The answers above address your question directly. If you ever need to figure this out on your own, the B::Deparse module, which comes standard with every Perl distribution, can be very helpful:

$ perl -MO=Deparse -e 'my $foo = bar() or baz()' baz() unless my $foo = bar(); -e syntax OK $ perl -MO=Deparse -e 'my $foo = bar() || baz()' my $foo = bar() || baz(); -e syntax OK
You can see how the two are interpreted very differently.


Comment on Re: Or Operator
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (14)
As of 2014-12-22 20:12 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (128 votes), past polls