in reply to hash with a hash

If you want to use a hash with another hash then you got to use references.

$tests{2} = %blah2; You should use ref like $test{2} = \%blah2;

Please go through references do use complex data structures.