$perldata = bless {hello => 'world'}, 'superman'; $bar = test($perldata); $baz = test($perldata); my $foo = test($perldata); $baz = undef; sub test { my $o = shift; print "test: $o\n"; my $m = bless {perldata => $o}, 'TQIS::test'; return $m; } sub TQIS::test::DESTROY { my $self = shift; warn $self->{perldata}; } #### superman=HASH(0x182b3dc) at noname2.pl line 18. test: superman=HASH(0x182b3dc) superman=HASH(0x182b3dc) at noname2.pl line 18. Warning: something's wrong at noname2.pl line 18 during global destruction. test: superman=HASH(0x182b3dc) test: superman=HASH(0x182b3dc)