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


in reply to Tell me how it works!

Because undef *a undefines the typeglob *a, but not the underlying slots. Look at these 2 examples:

#1 $a = 10; *b = *a; $a = 4; print $b; # <- prints 4 #2 $a = 10; *b = *a; undef *a; $a = 4; print $b; # <- prints 10!

citromatik