On Tue, Dec 15, 2009 at 7:50 PM, Xiao Lan (小兰) <[email protected]> wrote:
>
>
>
> I did have tried that, but this will get a runtime error.
>

Sorry this is exactly a compile-time error.

# cat except.pl

eval { $x=12/0 };
print "0 div error" if $@;

# perl -c except.pl
Illegal division by zero at except.pl line 2.

So, can't we capture it at runtime when meeting such error?

--
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
http://learn.perl.org/


Reply via email to