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";