develooper Front page | perl.perl5.porters | Postings from September 2003

Re: List::Util reduce strangeness

Thread Previous
From:
Dave Mitchell
Date:
September 26, 2003 11:57
Subject:
Re: List::Util reduce strangeness
Message ID:
20030926185750.GA3630@fdgroup.com
On Fri, Sep 26, 2003 at 03:48:36PM +0100, Tony Bowden wrote:
> 
> This works as expected:
> 
> my $reduce = reduce { $a + $b } map $_, (1 ..  10);
> 
> This doesn't:
> 
> my $reduce = reduce { [@$a + @$b] } map [$_], (1 ..  10);

Seems to work fine on 5.8.1 and bleedperl.

-- 
SCO - a train crash in slow motion

Thread Previous


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