use strict; use warnings; use Data::Dumper; local $; = '#'; my %hash1; $hash1{'Hello', 'World'} = 1; $hash1{'Hello', 'Pluto'} = 2; $hash1{'Goodbye', 'World'} = 3; $hash1{'Goodbye', 'Pluto'} = 4; my %hash2 = %hash1; # copy $hash2{'Goodbye', 'Pluto'}++; # alter hash 2 print "$hash2{'Goodbye', 'Pluto'}\n"; # show that it is altered print "$hash1{'Goodbye', 'Pluto'}\n"; # hash1 remains unaltered # Let's see what's going on here... print Dumper(\%hash1, \%hash2);