Dear Michael,
Thanks for your immediate reply.
Well for now I only expect true / False.
The condition is not becoming true in any case.
Even when I am gernating specific errors in the eval block.
The code i am trying is like this.
$done="false";
while( $done eq "false ") {
eval {
......
.....
read form files.
....process info...
write back to files
};
( $@ ) ? ($done="false") : ($done="true");
}
This will loop is supposed to keep trying till the work is done. (a counter
is added for specfic number of try).
regards
Rajeev Rumale
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Rajeev Rumale
MyAngel.Net Pte Ltd., Phone :
(65)8831530 (office)
#04-01, 180 B, The Bencoolen, Email :
[EMAIL PROTECTED]
Bencoolen Street, Singapore - 189648 ICQ : 121001541
Website : www.myangel.net
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
----- Original Message -----
From: "Michael Fowler" <[EMAIL PROTECTED]>
To: "Rajeev Rumale" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Monday, June 25, 2001 10:51 AM
Subject: Re: Exceptions ( catching and handeling).
> On Mon, Jun 25, 2001 at 09:46:06AM +0800, Rajeev Rumale wrote:
> > But I am not getting the proper values in $@ variable.
>
> What do you mean you're not getting the proper values in $@? What values
are
> you getting, what are you expecting?
>
>
> > I would be greatfull if any one can explain the correct usage of eval{}
> > blocks.
>
> eval { ... };
> die("Error in eval: $@") if $@;
>
> You may also wish to localize the __DIE__ handler, and thus remove the
> current handler until your eval is done.
>
> eval { local $SIG{__DIE__}; ... }
>
> See perldoc -f eval.
>
>
> Michael
> --
> Administrator www.shoebox.net
> Programmer, System Administrator www.gallanttech.com
> --
>