#!/usr/bin/perl use strict; use warnings; use Data::Dumper; my %hash = (key1 => { subkey1 => [ qw(a number of elements in an array) ], }, key2 => "value2"); my %hash2 = %hash; $hash2{key1}->{subkey1} = [ qw(other elements in an array) ]; print Dumper(\%hash); print Dumper(\%hash2); #### Elt "key2" HASH = 0x3e4d4a SV = PV(0x80f6498) at 0x81009c4