http://www.perlmonks.org?node_id=521402


in reply to Re^2: Obtaining terms in an expansion
in thread Obtaining terms in an expansion

my $prod = 1; # multiplicative identity, of course for ( @a ) { my($x,$y) = @$_; $prod *= $x + $y; }

That does what you describe, but it's not 2^N. Not sure where the discrepancy lies...

We're building the house of the future together.