On Wed, Oct 10, 2001 at 01:27:35PM -0700, Colin Meyer wrote: > On Wed, Oct 10, 2001 at 09:42:58PM +1000, Damian Conway wrote: > > > > John observed: > > > > > I just read Apocalypse and Exegesis 3, and something stuck out at me > > > because of its omission, namely using hyper operators for reduction. > > > > > > $a ^+= @list; # should sum the elements of @list > > Does this mean that > > @a ^+= @b; > > will add every value of @b to every value of @a?
That's what I'd expect it to do. Well ... that's assuming you really mean "each" where you said "every". i.e., my $i = 0; while ($i < length(@a) && $i < length(@b)) { @a[$i] += @b[$i]; } Just like I'd expect @a = @b ^=~ @patterns; to be roughly equivalent to: my $i = 0; @a = (); while ($i < length(@patterns) && $i < length(@b)) { push @a, (@b[$i] =~ @patterns[$i]); $i++; } -Scott -- Jonathan Scott Duff [EMAIL PROTECTED]