in reply to Re^2: How do I dump data to file on hard exit?
in thread How do I dump data to file on hard exit?

The process might get a TERM signal on a reboot so set up a handler for that as well.

$SIG{TERM} = ...

Cheers,

JohnGG