Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
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 ( [id://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
Domain Nodelet?
Node Status?
node history
Node Type: note [id://446573]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others surveying the Monastery: (3)
As of 2024-04-19 23:42 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found