No such thing as a small change | |
PerlMonks |
Can an anonymous sub in a hash value know its key?by webengr (Pilgrim) |
on Mar 17, 2005 at 06:04 UTC ( [id://440275]=perlquestion: print w/replies, xml ) | Need Help?? |
webengr has asked for the wisdom of the Perl Monks concerning the following question:
Greetings Monks!
This may have been asked (and answered) before, but I didn't run across it in the search tool. My question is this: Is there a way that an anonymous sub stored as a hash value can have access to its associated key? I am imagining something that would satisfy,
At the moment this is just a curiosity for me, but if there is a way to do this it might come in handy sometime. If there's one thing that Perl has taught me, it's that I shouldn't jump to conclusions about what isn't possible. PCS
I was recently asked, "Does your program know when it isn't running?"
Back to
Seekers of Perl Wisdom
|
|