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