Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re: opening missing file inside eval statement

by PeterPeiGuo (Hermit)
on Jan 08, 2011 at 21:03 UTC ( [id://881273]=note: print w/replies, xml ) Need Help??


in reply to opening missing file inside eval statement

This is basically perl's way of throwing exceptions. What you put in "die" is essentially your exception.

It might be beneficial for open to throw exception in some cases, but that's not always the case. The fact that perl leaves it to you to decide whether to throw exception, makes things flexible.

Peter (Guo) Pei

  • Comment on Re: opening missing file inside eval statement

Log In?
Username:
Password:

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

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

    No recent polls found