in reply to Save hash value?

Don't make copies.
use DDS; my $ref = { 1 .. 4 }; my %foo = %{ $ref }; $foo{1} = 6; Dump( $ref, \%foo ); __END__ $HASH1 = { 1 => 2, 3 => 4 }; $HASH2 = { 1 => 6, 3 => 4 };
%foo and $ref point to two different hashes. %foo is a shallow copy of has pointed to by $ref. See references quick reference