Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re: Question on style/technique

by John M. Dlugosz (Monsignor)
on Jul 06, 2001 at 07:23 UTC ( #94370=note: print w/replies, xml ) Need Help??


in reply to Question on style/technique

I'd say that there is nothing wrong with the if/else, if you indeed want to do different things based on the file opening or not.

The or die is just what you should always do if you don't otherwise check the result in your logic. It's the default, fallback thing to do if you don't have anything else to do.

Hmm, maybe Perl 6 will have a property for a sub that will warn if it's called in void context, pointing out that "you better check the result of this!".

—John

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (8)
As of 2021-03-08 19:30 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My favorite kind of desktop background is:











    Results (127 votes). Check out past polls.

    Notices?