in reply to
Can an anonymous sub in a hash value know its key?
You could use closures (
{ my $key = 'abc'; $h{$key} = sub { ... $key ... }; }
), but it won't updated if you move the sub to another key, and the whole idea reaks of bad design.
Comment on
Re: Can an anonymous sub in a hash value know its key?
Download
Code
In Section
Seekers of Perl Wisdom