in reply to
a general question on references...
A lexical variable dies when its reference count goes to zero. Since you return a reference to %hash, it lives on :)
Comment on
Re: a general question on references...
In Section
Seekers of Perl Wisdom