http://www.perlmonks.org?node_id=701078


in reply to print on reboot or process shutdown

I've got this now.
$endthis = 0; ... $endthis = 1; exit; END { if ($endthis == 0) { open(THEND,">ABORTED"); close(THEND); } }
But it doesn't work well. I dunno why. And I also have another prob. die "not good!\n" && ($endthis = 1) && (unless ($ARGV[1])); What's the correct syntax for this? Thx in advance