#! perl -slw use strict; use Carp qw[ cluck ]; my $x = 0; $SIG{ __DIE__ } = sub{ $x = 1 }; sub DESTROY{ cluck 'DESTROY called' . ($x ? ' after die':'') } { my $r=bless[]; } my $r = bless[]; die 'dying'; __END__ c:\test>junk79 DESTROY called at C:\test\junk79.pl line 9 main::DESTROY('main=ARRAY(0xacf98)') called at C:\test\junk79.pl line 15 eval {...} called at C:\test\junk79.pl line 15 dying at C:\test\junk79.pl line 17. DESTROY called after die at C:\test\junk79.pl line 9 main::DESTROY('main=ARRAY(0x2e67e8)') called at C:\test\junk79.pl line 17 eval {...} called at C:\test\junk79.pl line 17