The exception even happens before the eval block is entered. This is because perl calculates immediate expressions during compile time. This should demonstrate it:
$ perl -lwe 'eval{0/0}' Illegal division by zero at -e line 1.
To work around that, you can try putting 0 into a variable.
In reply to Re: Catching a 'division by zero' error with Exception::Class
by betterworld
in thread Catching a 'division by zero' error with Exception::Class
by baurel
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |