I use :
END {
my ($char);
open(F,$0);
read(F,$char,1);
if ($char ne '#') {
dump;
}
}
Now, this does break any return codes, but on windows, the dump function does not seem to create any sort of core files, so i find this work pretty well, when working on exe's for myself.
from the frivolous to the serious