You can only store scalars in a hash. So you'll need to store a reference to the hash (\%hashname) rather than the hash itself. Otherwise you'll end up storing the scalarization of the hash instead. See
perldata,
perlref and
perllol for detailed info on this.
I'm a pretty hardcore Perl nerd and I still re-read those every year or so. They're written quite well.