Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
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 drinking their drinks and smoking their pipes about the Monastery: (10)
As of 2014-12-19 21:03 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (91 votes), past polls