http://qs321.pair.com?node_id=659088


in reply to Re: Unexpected result after localizing eval_error variable "$@" within "BEGIN" block
in thread Unexpected result after localizing eval_error variable "$@" within "BEGIN" block

From perlmod:

It should be noted that "BEGIN" code blocks are executed inside string "eval()"ís.

Try also:

eval q{ local $@; call_undefined_subroutine_or_another_error("argument"); };

versus:

eval q{ call_undefined_subroutine_or_another_error("argument"); };

versus:

BEGIN { call_undefined_subroutine_or_another_error("argument"); }