use strict; use warnings; sub Foo::DESTROY{ print "object $_[0]->[0] destroyed\n"; } my $foo = bless [ 'foo' ], 'Foo'; # notice 'my' our $bar = bless [ 'bar' ], 'Foo'; # notice 'our' END { print "END block executed\n"; }