Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
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 learning in the Monastery: (6)
As of 2024-04-23 21:31 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found