Perl loves smoothing your data structures. This is often a good thing ... for example, (@options, "another option", "yet another") ends up as one list.
If you really want to have one structure inside another, the internal structure should be a reference. For example:
%a{1} = { %b };
Brackets mean a hash that you populate with values from% b, and come back as a link, not a direct hash.
You can also say
$a{1} = \%b;
but this makes the changes to% b also the change to $ a {1}.
cHao
source share