use Data::Dumper; no strict; %hash = ( a => 'x123' ); $hash{a}{b} = 'data'; print Dumper \%hash; #### $VAR1 = { 'a' => 'x123' }; #### print Dumper \%hash, \%x123; #### Name "main::x123" used only once: possible typo at Z:\test.pl line 6. $VAR1 = { 'a' => 'x123' }; $VAR2 = { 'b' => 'data' };