On Wed, Oct 10, 2001 at 04:34:14PM -0500, Jonathan Scott Duff wrote:
> On Wed, Oct 10, 2001 at 02:23:33PM -0700, Colin Meyer wrote:
> [ @a ^+= @b ]
> > What I'd expect is more like:
> >
> > foreach my $elem (@a) {
> > $elem ^+= @b;
> > }
>
> Hrm. Why would you expect that when you'd have written as you just
> did? Would you also expect
>
> @a = @b ^+ @c;
>
> to mean
>
> @a = (); for (@b) { push @a, $_ ^+ @c; }
Maybe this illustrates my confusion:
$a = 1;
@a = (1);
@b = (1, 2, 3);
@c = (4, 5, 6);
$a = $a ^+ @b;
@a = @a ^+ @b;
print $a; # 7
print @a; # 7 or 2?
-C.