use Devel::Peek; sub DESTROY { print STDERR "*Destroyed*\n" } { local $foo; { my $bar = bless {}; $foo = $bar; Dump($foo); print STDERR ("Exiting inner\n"); } Dump($foo); print STDERR ("Exiting outer\n"); } print STDERR ("Exiting file scope\n");