How to accumulate Hashes of Array value with the same key?
From: Edward Wijaya (ewijaya_at_singnet.com.sg)
Date: 09/30/04
- Next message: Gavin Henry: "Re: How Can I rename File using Perl?.."
- Previous message: Paul Johnson: "Re: Need help with script"
- Next in thread: Matthew Shaw: "RE: How to accumulate Hashes of Array value with the same key?"
- Maybe reply: Matthew Shaw: "RE: How to accumulate Hashes of Array value with the same key?"
- Maybe reply: Matthew Shaw: "RE: How to accumulate Hashes of Array value with the same key?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
To: "beginners@perl.org" <beginners@perl.org> Date: Fri, 01 Oct 2004 00:51:37 +0800
Hi,
I have thre HoAs with the same key but different value.
How can I efficiently join the HoA:
my %HoA = (key1 => ['A',1]);
my %HoA2 = (key1 => ['B',2]);
my %HoA3 = (key1 => ['C',2]);
into:
%HoA = (key1 => ['A',1],['B',2],['C',2]);
namely accumulating the value of HoA2,HoA3 into HoA.
Thanks very much for the time.
Regards,
Edward WIJAYA
SINGAPORE
- Next message: Gavin Henry: "Re: How Can I rename File using Perl?.."
- Previous message: Paul Johnson: "Re: Need help with script"
- Next in thread: Matthew Shaw: "RE: How to accumulate Hashes of Array value with the same key?"
- Maybe reply: Matthew Shaw: "RE: How to accumulate Hashes of Array value with the same key?"
- Maybe reply: Matthew Shaw: "RE: How to accumulate Hashes of Array value with the same key?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]