Note that I'd consider this as being sloppy programming. I think you shouldn't pass wrong arguments to substr(). Instead of worrying about how to trap the condition, you should prevent it from happening.use warnings FATAL => 'substr'; ... eval { substr($str, $really_big_number) }; if ($@) { # an exception is now thrown }
In reply to Re: Advanced warning handling?
by acid06
in thread Advanced warning handling?
by eff_i_g
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |