No I do not wanna die so fast.. I want to do some processing based on the
died message.

--
Ankur

-----Original Message-----
From: Todd de Gruyl [mailto:[EMAIL PROTECTED] 
Sent: Thursday, March 31, 2005 12:24 AM
To: Ankur Gupta
Cc: beginners@perl.org
Subject: Re: My own die message

On 03/30/2005 01:48 PM, Ankur Gupta wrote:
 > eval{
 >
 >          require "file" or die "unable to find file";
 >
 >         };
 >
 >         print "$@";
 >
 >
 >
 > But it always prints "Can't locate file in @INC. blah blah "

If you actually want to die, try moving the die outside of the eval:

eval { require "file";} or die "unable to find file $@";

-- 
Todd de Gruyl

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>





-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to