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.