Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re^2: why avoid & on function call (updated x 3)

by Anonymous Monk
on Dec 28, 2020 at 19:38 UTC ( [id://11125899]=note: print w/replies, xml ) Need Help??


in reply to Re: why avoid & on function call (updated x 3)
in thread why avoid & on function call

defined &func, exists &func, and goto &func (distinct from the troublesome goto LABEL) are some other examples when you would use the ampersand to refer to a named function. -Dan
  • Comment on Re^2: why avoid & on function call (updated x 3)

Replies are listed 'Best First'.
Re^3: why avoid & on function call (updated x 3)
by LanX (Saint) on Dec 28, 2020 at 20:14 UTC
    > are some other examples when you would use the ampersand to refer to a named function.

    goto was already mentioned :)

    > > ²) some built-ins require & with named subs as arguments, like goto, map , grep , sort

    Cheers Rolf
    (addicted to the Perl Programming Language :)
    Wikisyntax for the Monastery

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others musing on the Monastery: (3)
As of 2025-06-17 04:53 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.