My question is why after I assign a reference to an object and then I loose the original reference to it (by assigning another value -> undef) The original hash in the array is changed too!my @arrayOfHashes; my %temporary; foreach $val (@variables) { # Here I populate a temporary hash # # .... # push @arrayOfHashes, \%temporary; %temporary = undef; }
In reply to hash refferences by leonidlm
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |