|No such thing as a small change|
Can an anonymous sub in a hash value know its key?by webengr (Pilgrim)
|on Mar 17, 2005 at 06:04 UTC||Need Help??|
webengr has asked for the
wisdom of the Perl Monks concerning the following question:
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.
I was recently asked, "Does your program know when it isn't running?"