http://www.perlmonks.org?node_id=425313


in reply to Re^2: my $cache = undef if undef;
in thread my $cache = undef if undef;

It cannot be clobbered, and there are no memory leaks in either case. It's an effect of how the pads for lexical variables are maintained by the Perl core. Larry didn't want to promise this will always work, but it's very unlikely to break, since it's kind of an accidental feature of the Perl guts architecture. A lot would have to change to break it.

Makeshifts last the longest.