Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
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 musing on the Monastery: (7)
As of 2014-12-25 01:38 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

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





    Results (159 votes), past polls