Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re: Problem with doubles results

by NERDVANA (Priest)
on May 17, 2024 at 20:36 UTC ( [id://11159518]=note: print w/replies, xml ) Need Help??


in reply to Problem with doubles results

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.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://11159518]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others studying the Monastery: (3)
As of 2025-06-15 05:56 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.