Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re^2: effects of ampersand and non ampersand when referencing a sub name

by tobyink (Abbot)
on Dec 20, 2012 at 17:55 UTC ( #1009771=note: print w/ replies, xml ) Need Help??


in reply to Re: effects of ampersand and non ampersand when referencing a sub name
in thread effects of ampersand and non ampersand when referencing a sub name

The (&) prototype is useful if you're writing subs that expect to be passed coderefs/callbacks. And (_) can be useful too.

perl -E'sub Monkey::do{say$_,for@_,do{($monkey=[caller(0)]->[3])=~s{::}{ }and$monkey}}"Monkey say"->Monkey::do'


Comment on Re^2: effects of ampersand and non ampersand when referencing a sub name
Select or Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (8)
As of 2014-07-11 08:18 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    When choosing user names for websites, I prefer to use:








    Results (220 votes), past polls