Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re^2: "or die" versus "|| die"

by rev_1318 (Chaplain)
on Jun 24, 2005 at 15:21 UTC ( #469738=note: print w/ replies, xml ) Need Help??


in reply to Re: "or die" versus "|| die"
in thread "or die" versus "|| die"

Yes these is a difference, as jeffa pointed out: precedence. As long as you use parentheses around e.d. open, it doesn't matter, but else it really makes a difference if you say:

open F, $file or die;
which will die when the open failes, or:
open F, $file || die
which will die if $file is false (undef, empty or 0), but NOT if the open fails!

Paul


Comment on Re^2: "or die" versus "|| die"
Select or Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (13)
As of 2015-07-06 15:02 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (77 votes), past polls