Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
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