Perl-Sensitive Sunglasses | |
PerlMonks |
Re^3: How to avoid closures and memory leaks.by Corion (Patriarch) |
on Oct 18, 2014 at 15:32 UTC ( [id://1104238]=note: print w/replies, xml ) | Need Help?? |
This is less an issue of closures and more an issue of you not understanding the difference between global variables (use vars) and lexical variables (my). See Coping With Scoping for a good explanation of these things. Basically, what you declare with use vars are global variable names, and these have no issues with closures, because anyone can get at a global variable as long as they know the name.
In Section
Seekers of Perl Wisdom
|
|