Beefy Boxes and Bandwidth Generously Provided by pair Networks
Come for the quick hacks, stay for the epiphanies.
 
PerlMonks  

Re: Or Operator

by VSarkiss (Monsignor)
on Jul 31, 2004 at 16:46 UTC ( [id://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.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others studying the Monastery: (7)
As of 2024-03-19 02:01 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found