Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re: not 'another victim of precedence' ? 'It is true' : 'the code is false'

by periapt (Hermit)
on Apr 11, 2005 at 12:01 UTC ( #446573=note: print w/ replies, xml ) Need Help??


in reply to not 'another victim of precedence' ? 'It is true' : 'the code is false'

That very think has burned me a couple of times also. That is why I surround the condition with parenthesis by default these days. Yeah, most of the time it isn't necessary but it doesn't hurt and the one or two times it is necessary, it has saved a lot of what is left of my thinning hair.

Nice writeup


PJ
use strict; use warnings; use diagnostics;


Comment on Re: not 'another victim of precedence' ? 'It is true' : 'the code is false'

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (5)
As of 2014-10-01 22:44 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    What is your favourite meta-syntactic variable name?














    Results (40 votes), past polls