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

Re: Re: Scratching my head...

by virtualsue (Vicar)
on May 01, 2001 at 01:31 UTC ( [id://76764]=note: print w/replies, xml ) Need Help??


in reply to Re: Scratching my head...
in thread Scratching my head...

This nicely illustrates the reason why I never use the 'open () || die' idiom, and I wish others wouldn't use it either. I think it suckers people into making this mistake, which in turn causes them a lot of needless debugging hell.

Replies are listed 'Best First'.
Re: Re: Re: Scratching my head...
by turnstep (Parson) on May 01, 2001 at 01:37 UTC

    What idiom do you use? I strongly prefer using "or" myself, but there is nothing wrong with using || as long as you get the parens straight. Besides, the 'debugging hell' tends to teach a very important lesson on the importance of precedence. :)

      I not only prefer "or", I have gone as far as coercing coworkers to use it as well, for the simple reason that "or" always works as expected in this type of statement. I'm a strong believer in Defensive Programming, and avoiding "debugging hell" at all costs. I honestly don't think that the lesson in this case is worth the potential time waste. This is only my opinion, I am definitely not telling anyone else here what to do.

Log In?
Username:
Password:

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

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

    No recent polls found