Of course the "last" END block has to be compiled before the use statements get processed -- it's end blocks in use-d items that are giving me the headache. So you need:
use vars qw($exitval); END {$? = $exitval} use LotsOStuff; use MoreStuff; use TheOtherGuy'sStuff; use StuffYouProbablyDontNeed; # your code here END {$exitval = $?}
In reply to Re^2: Getting around $? setting in END blocks
by DrWhy
in thread Getting around $? setting in END blocks
by DrWhy
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |