mirage_zz has asked for the wisdom of the Perl Monks concerning the following question:
I need the sum of matching D's in both the arrays. Output should be a single associative array as shown below:$var = [ { "D1" => 1, "D2" => 2 }, { "D2" => 5, "D3" => 6 }, ];
It would be great if the above array were sorted based on the values:$var = ( "D1" => 1, "D2" => 7 "D3" => 6 )
Kindly help. Rgds.$var = ( "D2" => 7 "D3" => 6 "D1" => 1, )
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Urgent Help: Array of Hashes
by ikegami (Patriarch) on Sep 26, 2007 at 23:45 UTC | |
by mirage_zz (Novice) on Sep 27, 2007 at 02:20 UTC | |
|
Re: Urgent Help: Array of Hashes
by merlyn (Sage) on Sep 26, 2007 at 23:39 UTC | |
by mirage_zz (Novice) on Sep 26, 2007 at 23:47 UTC | |
by perlfan (Parson) on Sep 27, 2007 at 15:10 UTC |