%foo and $ref point to two different hashes. %foo is a shallow copy of has pointed to by $ref. See references quick referenceuse 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 };
In reply to Re: Save hash value?
by Anonymous Monk
in thread Save hash value?
by toxicious
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |