On Mon, Jun 25, 2001 at 11:29:16AM +0800, Rajeev Rumale wrote:
> $done="false";
>
> while( $done eq "false ") {
> eval {
> ......
> .....
> read form files.
> ....process info...
> write back to files
>
> };
> ( $@ ) ? ($done="false") : ($done="true");
>
> }
If $done isn't becoming "true" then something in your eval is causing a
fatal exception, every time. I would suggest printing out $@ to see what
the problem is.
Also, as a tip, don't use the strings "true" and "false" in Perl, use the
values Perl understands to be true and false, they're easier to test. For
example:
my $done;
until ($done) {
eval { ... };
$done = $@ ? 0 : 1;
}
This runs the code until $done is true, and $done only becomes true if there
are no fatal exceptions from your eval.
Michael
--
Administrator www.shoebox.net
Programmer, System Administrator www.gallanttech.com
--