> perl -d debug_test_DESTROY.pl Loading DB routines from perl5db.pl version 1.28 Editor support available. Enter h or `h h' for help, or `man perldebug' for more help. Foo::(debug_test_DESTROY.pl:3): my $i; DB<1> n Main::(debug_test_DESTROY.pl:15): $x = Foo->new; DB<1> n Main::(debug_test_DESTROY.pl:16): $y = Foo->new; DB<1> n Main::(debug_test_DESTROY.pl:18): print "hello"; DB<1> q destroying object <1> ## <--- look, DESTROY() called for $x ## at debug_test_DESTROY.pl line 10 Foo::DESTROY('Foo=ARRAY(0x97acc6c)') called at debug_test_DESTROY.pl line 0 eval {...} called at debug_test_DESTROY.pl line 0 destroying object <2> ## DESTROY() called for $y ## at debug_test_DESTROY.pl line 10 Foo::DESTROY('Foo=ARRAY(0x97f1348)') called at debug_test_DESTROY.pl line 0 eval {...} called at debug_test_DESTROY.pl line 0