develooper Front page | perl.perl6.language | Postings from October 2001

Re: reduce via ^

Thread Previous | Thread Next
From:
Colin Meyer
Date:
October 10, 2001 15:46
Subject:
Re: reduce via ^
Message ID:
20011010154842.L15585@hobart.helvella.org
On Wed, Oct 10, 2001 at 03:41:18PM -0700, Colin Meyer wrote:
> 
> 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?
 
Or, after re-reading the apocolypse again, it seems:

print @a; # 234 ?

> 
> -C.

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About