use Devel::Reference; my $x = [1,2,3]; my $addr = Devel::Reference::conceal($x); # the refcount of [1,2,3] is now 2 undef $x; # the refcount of [1,2,3] is now 1 my $y = Devel::Reference::reveal($addr); # the refcount of [1,2,3] REMAINS at 1 print "@$y\n"; # "1 2 3"