use strict; use Data::Dumper; my %first; $first{'foo'}{'bar'} = 1; $first{'foo'}{'baz'} = 2; $first{'bah'}{'oof'} = 3; print "First hash:\n"; print Dumper \%first; my %second = %first; print "\nSecond hash\n"; print Dumper \%second; print "\nFirst nested hash address: $first{'foo'}\n"; print "Second nexted hash address: $second{'foo'}\n"; #### First hash: $VAR1 = { 'bah' => { 'oof' => 3 }, 'foo' => { 'baz' => 2, 'bar' => 1 } }; Second hash $VAR1 = { 'bah' => { 'oof' => 3 }, 'foo' => { 'baz' => 2, 'bar' => 1 } }; First nested hash address: HASH(0x804ee40) Second nexted hash address: HASH(0x804ee40)