Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re^2: Passing variable to if statement

by Anonymous Monk
on Jul 16, 2014 at 20:55 UTC ( [id://1093940]=note: print w/replies, xml ) Need Help??


in reply to Re: Passing variable to if statement
in thread Passing variable to if statement

I think OP's original code is fine in this regard. I'd say autodie is helpful for those who know all the things that it does, or e.g. for dropping into legacy scripts that don't do enough error checking. But, as I've discovered, it can also cause problems when it's used, and its bug trackers (1, 2) show I'm not the only one. Don't get me wrong, it's a good recommendation, I just disagree that it's a "best practice" - it's just MTOWTDI.

Replies are listed 'Best First'.
Re^3: Passing variable to if statement
by Anonymous Monk on Jul 16, 2014 at 21:05 UTC
    I think OP's original code is fine in this regard.

    Whoops, I missed the missing or die in the second open. Nevermind that sentence.

      Agreed, I didn't really mean  use autodie; was a best practice.. should have clarified and used the  or die instead :p

Log In?
Username:
Password:

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

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

    No recent polls found