my %hash; $hash{foo} = 'bar'; # the following replaces the value of $hash{foo} with a hash reference $hash{foo}{bar} = 'baz'; # the following is equivalent $hash{foo} = { bar => 'baz' };