> > right, and what does this all mean? I have yet to see a good meaning > > for > > @array ^[+]= @array2 ... > > I think it's this: > > @a [+=] @b -> @a[x] += @b[x] > > @a [+]= @b -> @temp = @a [+] @b; a = @temp; >
Ok, so the '=' isn't being explicitly vectorized. So - @a ^[+]= @b; @a = (1,2,3,4); @b = (5,6,7,8); @temp = @a ^+ @b; = (1+5,2+6,3+7,4+8) = (6,8,10,12); @temp = (6,8,10,12); @a = (6,8,10,12); wheras: @a ^+= @b; $a[0] += $b[0]; $a[1] += $b[1]; $a[2] += $b[2]; $a[3] += $b[3]; $a[0] = 1 + 5; $a[1] = 2 + 6; $a[2] = 3 + 7; $a[3] = 4 + 8; @a = (6,8,10,12); ie: they are exactly the same. I'd say that '=' has *implicit* vectorization here in the array case. In the scalar case: @a ^[+]= 1; @temp = @a ^+ 1; it is exactly the same. @a ^+= 1; $a[0] +=1; .... $a[3] +=; So again, I don't see the difference between the two. ^[+]= and ^+= are synonyms as far as I can see, and hence no need for the first form. Ed