Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re^2: why avoid & on function call

by chromatic (Archbishop)
on Dec 27, 2020 at 17:34 UTC ( #11125798=note: print w/replies, xml ) Need Help??


in reply to Re: why avoid & on function call
in thread why avoid & on function call

others place them at the start because of the behaviour when not using the ampersand

Another reason is to avoid accidentally closing over lexical variables declared outside of function scope.


Improve your skills with Modern Perl: the free book.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://11125798]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others perusing the Monastery: (3)
As of 2022-12-09 03:04 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?