in reply to Advanced warning handling?

Well, you could:
use warnings FATAL => 'substr'; ... eval { substr($str, $really_big_number) }; if ($@) { # an exception is now thrown }
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.


acid06
perl -e "print pack('h*', 16369646), scalar reverse $="