in reply to Re^2: Scope of a Hash
in thread Scope of a Hash

I'm still not getting exactly what I wanted here

If you don't get it, then how do you expect us to? ;-)

Jokes apart, at first sight your code seems more complex then it may actually be. Can you consider refactoring it in a more "efficient" (human-wise!) way? Said this, an advice that pairs well with the good "do not use typeglobs for this" one is: do not use the &-form of sub call: it is not necessary and obsolete in modern perls. It may be safe enough, but it doesn't do what you want and it's still there for another purpose: see perldoc perlsub.