in reply to How to explicitly destroy an object so that all other references to it would become false?
Usually, one let scopes take care of this:
use strict; use warnings; my $z = bless {}, "XXX"; my $w; { $w = \$z; } print "hurray!\n" if ! $w; print "still got \$z" if $z;
But, it would be interesting to see a good use for the solution you are asking for.
hth
Edit: unintentionally my'ed $w inside the inner scope...
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: How to explicitly destroy an object so that all other references to it would become false?
by John M. Dlugosz (Monsignor) on Feb 22, 2008 at 00:39 UTC | |
by stiller (Friar) on Feb 22, 2008 at 08:00 UTC | |
by John M. Dlugosz (Monsignor) on Feb 22, 2008 at 08:43 UTC |