Don't ask to ask, just ask | |
PerlMonks |
Re^3: naming anonymous subroutines inner variablesby BrowserUk (Patriarch) |
on Jun 22, 2016 at 22:01 UTC ( [id://1166317]=note: print w/replies, xml ) | Need Help?? |
either the $k or the $closure method work Be careful! Whilst the for my $name... works, it is dangerous:
With the for my $name ( ... ) method, the closures are and remain aliases to the source list in the for loop; which means that if you assign to the closure within the subroutine, you will cause spooky action at a distance to the content of that source. And perhaps worse, changes to the source of the for list, will remotely change the contents of the closures:
With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority". I knew I was on the right track :)
In the absence of evidence, opinion is indistinguishable from prejudice. Not understood.
In Section
Seekers of Perl Wisdom
|
|