![]() |
|
The stupid question is the question not asked | |
PerlMonks |
Devel::Symdump and symbol table woesby bpphillips (Friar) |
on Nov 10, 2005 at 15:13 UTC ( #507395=perlquestion: print w/replies, xml ) | Need Help?? |
bpphillips has asked for the wisdom of the Perl Monks concerning the following question:
Hello all, Can somone explain why the following code has the indicated output? Devel::Symdump aside, what I really want to know is why the SCALAR entry for any non-scalar symbol table glob return a reference to undef instead of simply undef: Devel::Symdump checks defined-ness in determining whether a symbol of a certain type exists and since the SCALAR portion of an ARRAY symbol table entry returns \undef, it passes that test and assumes that $private::my_array really exists as a scalar. This seems at least unexpected and possibly a flaw at some level but I'm way over my head as far as my knowledge of Perl innards. I look forward to being enlightened! -- Brian
Back to
Seekers of Perl Wisdom
|
|