There's more than one way to do things | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
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 In reply to Re: Question on style/technique
by John M. Dlugosz
|
|