Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re: Debugging Regexes

by skyknight (Hermit)
on Jun 29, 2004 at 12:46 UTC ( [id://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'
    IMO

Log In?
Username:
Password:

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

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

    No recent polls found