How to accumulate Hashes of Array value with the same key?

From: Edward Wijaya (ewijaya_at_singnet.com.sg)
Date: 09/30/04


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