in reply to Add hash to hash

Here's a sample that shows your second line actually works.
#!/usr/bin/perl use strict; use Data::Dumper; my %hoh; my %hash = ( 'a' => 1, 'b' => 2 ); $hoh{'key'} = \%hash; print Dumper \%hoh;
The output is:
$VAR1 = { 'key' => { 'a' => 1, 'b' => 2 } };