Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number

Re: Debugging Regexes

by skyknight (Hermit)
on Jun 29, 2004 at 12:46 UTC ( #370462=note: print w/replies, xml ) Need Help??

in reply to Debugging Regexes

Personally, I think that the way you wrote that statement is evil and such constructs should be avoided. I really shouldn't have to think too hard about operator evaluation order to figure out how your code works. You could have at least put parentheses around the operands of the &&. As the code presently exists, I'd have to run it through a debugger to convince myself that it works the way you claim it works.

Maybe this is an extreme opinion, but I think I'd prefer that compilers/interpreters forced you to parenthesize for stuff like that, and threw ambiguity errors when you didn't.

Replies are listed 'Best First'.
Re^2: Debugging Regexes
by Jasper (Chaplain) on Jun 29, 2004 at 16:18 UTC
    yer.. the OP should have used something like:
     print /foo/ ? 'bar' : 'baz'

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (6)
As of 2018-08-21 21:10 GMT
Find Nodes?
    Voting Booth?
    Asked to put a square peg in a round hole, I would:

    Results (203 votes). Check out past polls.