in reply to Using STDERR and timestamps to write to a log file

You can have a $SIG{__DIE__) handler add the timestamp,

local $SIG{__DIE__} = sub { my $msg = localtime() . ' ' . shift; die $msg; };

After Compline,
Zaxo