Perl-Sensitive Sunglasses | |
PerlMonks |
Re: Why does Perl allow you to return array references to variables in local scope?by moritz (Cardinal) |
on Oct 16, 2013 at 12:20 UTC ( [id://1058432]=note: print w/replies, xml ) | Need Help?? |
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 Section
Seekers of Perl Wisdom
|
|