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

Re: reduce via ^

Thread Previous | Thread Next
From:
Jonathan Scott Duff
Date:
October 10, 2001 14:34
Subject:
Re: reduce via ^
Message ID:
20011010163414.I17820@cbi.tamucc.edu
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; }

?

-Scott
-- 
Jonathan Scott Duff
duff@cbi.tamucc.edu

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