Glenn Linderman writes:
: Why not
: 
:    @foo = @( a + b );   # element by element add of @a and @b

I expect that's be written:

    @foo := @a + @b;

where the := says to treat the left side as a prototype, and a bare
array in a prototype is going to put scalar context on the right side,
and a + in scalar context is going to do the right thing with arrays
in scalar context.  It's possible that a bare = could be made to work
too, but it implies copying a list, where := only implies copying
a pointer.

Larry

Reply via email to