![]() |
|
No such thing as a small change | |
PerlMonks |
Re: Problem with doubles resultsby NERDVANA (Priest) |
on May 17, 2024 at 20:36 UTC ( [id://11159518]=note: print w/replies, xml ) | Need Help?? |
You declared my %hash outside of the loop, so each time you push @updated_data, \%hash you get a reference to the same hash. So, it will be an array of many references to the final value of the hash on the last loop iteration.
Declare my %hash inside the loop to get a new one each time.
In Section
Seekers of Perl Wisdom
|
|