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

Re^3: Can I from within a module access variables from the calling program?

by tobyink (Abbot)
on Oct 25, 2012 at 13:29 UTC ( #1000866=note: print w/replies, xml ) Need Help??


in reply to Re^2: Can I from within a module access variables from the calling program?
in thread Can I from within a module access variables from the calling program?

The only 5.10-specific feature I used was say which is a new (well... five years old) keyword which works like print but automatically appends a new line.

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

Replies are listed 'Best First'.
Re^4: Can I from within a module access variables from the calling program?
by HJO (Acolyte) on Oct 25, 2012 at 13:33 UTC

    Oh indeed that's quite usefull. Thanks I think i'll be able to adapt this

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (3)
As of 2016-09-26 01:33 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Extraterrestrials haven't visited the Earth yet because:







    Results (475 votes). Check out past polls.