The sub fiddleHash is only supposed to alter hash2 but it also alters hash1
Since you use this my %hash2 = %hash1;, then do this
Then you will see why!print %hash2; print %hash1;
In reply to Re: changing copy of a hash changes original
by 2teez
in thread changing copy of a hash changes original
by edo
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |