Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re^3: Looking for discussions of "block after or" syntax error

by Laurent_R (Canon)
on May 01, 2013 at 21:34 UTC ( [id://1031655]=note: print w/replies, xml ) Need Help??


in reply to Re^2: Looking for discussions of "block after or" syntax error
in thread Looking for discussions of "block after or" syntax error

Agreed. I did not think about that. And I usually don't do such a print anyway but rather a die statement (although, going to the end of this logic, what do you do if die fails? Do you 'die "i failed" or die "die failed"'?

Usually, the only reason I want to know that opening a file failed if to get an immediate diagnostic of the reason for the program failure. If the print statement fails, well, I am likely to have more severe problems than just file opening.

  • Comment on Re^3: Looking for discussions of "block after or" syntax error

Replies are listed 'Best First'.
Re^4: Looking for discussions of "block after or" syntax error
by davido (Cardinal) on May 01, 2013 at 21:48 UTC

    die doesn't have a useful return value (to my knowledge), and would never be placed on the lefthand side of a logical short circuit.


    Dave

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others wandering the Monastery: (2)
As of 2024-04-26 03:43 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found