To illustrate dave_the_m's and Bob9000's point, compare
#!/usr/bin/perl $Yakkity::Yak::a = 42; print "a = $Yakkity::Yak::a\n"; print "Undeffing symbol table\n"; undef %Yakkity::Yak::; print "a = $Yakkity::Yak::a\n"; __END__ a = 42 Undeffing symbol table a = 42
with
#!/usr/bin/perl $Yakkity::Yak::a = 42; print "a = $Yakkity::Yak::a\n"; print "Undeffing symbol table\n"; undef %Yakkity::Yak::; print "a = ${'Yakkity::Yak::a'}\n"; # <- Hardcoded reference removed __END__ a = 42 Undeffing symbol table a =
The last reference to $Yakkity::Yak::a keeps the symbol alive. If the reference to one built at run-time, the symbol disappears along with the table.
Sorry, this post just explains what is seen, not how to work around it. Hopefully, someone has a solution.
In reply to Re^2: Undefining symbol tables and globs and things, oh my
by ikegami
in thread Undefining symbol tables and globs and things, oh my
by friedo
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |