On Tue, Dec 15, 2009 at 7:50 PM, Xiao Lan (小兰) <practicalp...@gmail.com> 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: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/


Reply via email to