#! perl use strict; use warnings; use Data::Dumper; my %hash = ( Fred => 'Wilma', Barney => 'Betty' ); my $ref = \%hash; my $copy = { %hash }; $hash{Homer} = 'Marge'; # Alter the original hash print "\nReference: ", Dumper($ref); print "\nCopy: ", Dumper($copy); #### 0:10 >perl 606_SoPW.pl Reference: $VAR1 = { 'Homer' => 'Marge', 'Barney' => 'Betty', 'Fred' => 'Wilma' }; Copy: $VAR1 = { 'Barney' => 'Betty', 'Fred' => 'Wilma' }; 0:10 >