On Mon, Jan 21, 2002 at 02:52:48PM +0000, Piers Cawley wrote: > > Now I have to go read the Perl 6.0 specs to see > > if this applies to hashes too. %a = %b ^+ %c has a most > > definitive twisted appeal to it. :) > > I think it does apply, but I'm not sure if addition is well defined on > pairs...
In an ideal world it would behave the same as
%a = (%b, %c);
for my $k (keys %a) {
$a{$k} += $b{$k} if exists($b{$k}) && exists($c{$k});
}
Well, in my dreams :-)
..robin.
