Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re^3: "or die" versus "|| die"

by halley (Prior)
on Jun 24, 2005 at 16:33 UTC ( #469758=note: print w/replies, xml ) Need Help??


in reply to Re^2: "or die" versus "|| die"
in thread "or die" versus "|| die"

In terms of your "rule of thumb," I like to say that || goes between expressions, and or goes between statements. It's kinda like how , goes between elements, but ; goes between statements. I'm not sure if my phrasing is any more clear to the uninitiated than talking in greek, though.

--
[ e d @ h a l l e y . c c ]

Replies are listed 'Best First'.
Re^4: "or die" versus "|| die"
by brian_d_foy (Abbot) on Jun 24, 2005 at 16:39 UTC

    That's not a good rule though because it doesn't actually provide useful guidance and it makes people think about the operators all wrong. It has nothing to do with expressions or statements. It's all about operators and in which order perl evaluates them. That's the information you need to pass on in your rule so that people can figure out what to do.

    --
    brian d foy <brian@stonehenge.com>

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://469758]
help
Chatterbox?
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (4)
As of 2016-12-06 02:17 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    On a regular basis, I'm most likely to spy upon:













    Results (96 votes). Check out past polls.