> > 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]);
> >
> 
> push @{$HoA{key1}}, ( @{$HoA2{key1}}, @{$HoA2{key1}});
> 

Sorry this should read:

@{$HoA{key1}}, ( @{$HoA2{key1}}, @{$HoA3{key1}});

--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to