The perlmod page clearly says that the first END that perl encounters is the last one that gets run, so maybe something like this would work for you:
# very very top of your first file END { if (@::final_exec) { exec {$::final_exec[0]} @::final_exec; } } # later that same day... @::final_exec = ($^X, 'scriptname.pl', @args);
In reply to Re^2: exec with cleanup
by Anonymous Monk
in thread exec with cleanup
by bart
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |