in reply to Help !! I need to feed all errors to a subroutine

What errors do you mean? To capture die for example use eval.
eval { # your code that may die }; if ( $@ ) { your_error_catcher( $@ ); }
Boris