According to the eval documentation, "If there was no error, $@ is guaranteed to be a null string." According to True or False? A Quick Reference Guide, the only expressions that would be false but not a null string are undef and 0 (or "0").
I think the only way there could be an error that is not caught by "if ($@)" would be if you were to throw an exception that uses overload to generate a false value in that case. That is to say, I think "if ($@)" would work in every case except where the code in the eval does something deliberately mean or it has a really unlikely bug.
In reply to Re: Question on "Effective Perl Programming"
by kyle
in thread Question on "Effective Perl Programming"
by jfroebe
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |