On Fri, Nov 01, 2002 at 10:35:08AM -0800, Ed Peschko wrote:
> 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.

Only in the absence of overloading, and only because we've naively defined array
ops to always do "union" rather than "intersection".  If there were a vector op
that took the shorter of two arrays as the overall length, then

    @a = @a »op« @b

will truncate @a, while

    @a »op=« @b

might only change the elements they have in common.  I don't know if we'll have
any such operators on arrays, but they've already been proposed for hashes.

So

    %a »op=« %b

might well be different from

    %a »op«= %b

depending on what op is.

Larry

Reply via email to