Perl-Sensitive Sunglasses | |
PerlMonks |
Re: closures: anonymous subs vs function templates?by Anonymous Monk |
on Dec 21, 2014 at 09:53 UTC ( [id://1110943]=note: print w/replies, xml ) | Need Help?? |
What is a 'function template?' local *name = sub {}; versus my $name = sub {}; are both created using anonymous subs. The assignment operator makes them go to different places though (sym table and lexpad, resp.). Then the difference between them is the same as the difference between all other local/my variables...
In Section
Seekers of Perl Wisdom
|
|