Just another Perl shrine | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
I was wondering... How does perl know where variables are in memory?
My assumption on package variables, or dynamics, is that it looks up, in the symbol table (known location is pre assumed), the reference for the name. I assume references are a structure containing a counter of refs, and a pointer. The reference's location in memory does not change until it is destroyed, and when the variable is reallocated, the reference pointer is updated. If i'm right (the above is really but a guess), how does this work on lexical variables? A seperate symbol table? And if not, how does it work? Thanks in advance -nuffin zz zZ Z Z #!perl In reply to Perl Internals - references and symbol table by nothingmuch
|
|