my %hashname = (); # init empty hash $hashname{key1} = "value1"; $hashname{key2} = { x => 'y' }; # nests an anonymous hash as the value for key2 #### my $href = \%hash;