Perl does not allocate my-variables on the stack, but rather on the heap. It uses automatic reference counting to deallocate the memory when the number of references that point to a value drops to zero.
In reply to Re: Why does Perl allow you to return array references to variables in local scope?
by moritz
in thread Why does Perl allow you to return array references to variables in local scope?
by MrSnrub
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |