Re: My own die message

2005-03-31 Thread Randal L. Schwartz
Chris == Chris Devers [EMAIL PROTECTED] writes: Chris On Thu, 31 Mar 2005, Ankur Gupta wrote: No I do not [want to] die so fast.. I want to do some processing based on the died message. Chris Fine then. Chris eval { Chris risky_action(); Chris } You forgot a semicolon here,

Re: My own die message

2005-03-31 Thread Chris Devers
On Thu, 31 Mar 2005, Randal L. Schwartz wrote: Chris == Chris Devers [EMAIL PROTECTED] writes: Chris Fine then. Chris eval { Chris risky_action(); Chris } You forgot a semicolon here, which will make Perl start to think you mean this to be an if modifier instead of

My own die message

2005-03-30 Thread Ankur Gupta
Hi, I have the following code : eval{ require file or die unable to find file; }; print $@; But it always prints Can't locate file in @INC. blah blah I want $@ to contain unable to find file. What am I doing wrong or it is not possible to override

Re: My own die message

2005-03-30 Thread Todd de Gruyl
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

RE: My own die message

2005-03-30 Thread Ankur Gupta
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

RE: My own die message

2005-03-30 Thread Chris Devers
On Thu, 31 Mar 2005, Ankur Gupta wrote: No I do not [want to] die so fast.. I want to do some processing based on the died message. Fine then. eval { risky_action(); } if $@ { my $status = $@; my $result = do_some_processing(); die Got $status,

Re: My own die message

2005-03-30 Thread Offer Kaye
On Thu, 31 Mar 2005 00:18:14 +0530, Ankur Gupta wrote: Hi, I have the following code : eval{ require file or die unable to find file; }; print $@; But it always prints Can't locate file in @INC. blah blah I want $@ to contain unable to find file.

RE: My own die message

2005-03-30 Thread Ankur Gupta
-Original Message- From: Offer Kaye [mailto:[EMAIL PROTECTED] Sent: Thursday, March 31, 2005 2:21 AM To: Ankur Gupta; Perl Beginners Subject: Re: My own die message On Thu, 31 Mar 2005 00:18:14 +0530, Ankur Gupta wrote: Hi, I have the following code : eval

Re: My own die message

2005-03-30 Thread Felix Geerinckx
On 30/03/2005, Ankur Gupta wrote: I have the following code : eval{ require file or die unable to find file; }; print $@; But it always prints Can't locate file in @INC. blah blah I want $@ to contain unable to find file. What am I doing wrong or it is not possible to override