use Data::Dumper; my %h; # intial hash # put in some random values $h{'a'}{'1'} = 'z'; $h{'a'}{'2'} = 'y'; $h{'a'}{'3'} = 'x'; $h{'b'}{'4'} = 'w'; $h{'b'}{'5'} = 'u'; $h{'b'}{'6'} = 'v'; $h{'c'}{'7'} = 'r'; $h{'c'}{'8'} = 's'; $h{'c'}{'9'} = 't'; # make an assignment that I assume is by value my %tmpHash = %h; # make a change in the temp hash $tmpHash{'b'}{'6'} = 'j'; print Dumper(%h); print "\n\n\n"; print Dumper(%x);