On Wed, Oct 10, 2001 at 04:04:18PM -0500, Jonathan Scott Duff wrote: > On Wed, Oct 10, 2001 at 01:27:35PM -0700, Colin Meyer wrote: > > > > 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]; $i++; > }
What I'd expect is more like: foreach my $elem (@a) { $elem ^+= @b; } Have fun, -C.