Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re: How to merge two arrays within the hash of arrays based on unique name.

by jcb (Parson)
on Jul 14, 2020 at 02:23 UTC ( [id://11119280]=note: print w/replies, xml ) Need Help??


in reply to How to merge two arrays within the hash of arrays based on unique name.

Try building a hash of hashes, keyed by $_->{name} and updating $Hash{$_->{name}}->{count_banking} as you go if the target hash element already exists. See perldsc for more.

Also note that your question describes an array of hashes, not a hash of arrays.

Replies are listed 'Best First'.
Re^2: How to merge two arrays within the hash of arrays based on unique name.
by Sami_R (Sexton) on Jul 14, 2020 at 10:26 UTC

    Hi JCB, Apologies for mentioning hash of arrays instead of array of hashes, thanks for the document referred which helps me understand better.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others learning in the Monastery: (3)
As of 2024-04-19 01:55 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found