in reply to Summing the elements of multiple arrays into a new array
It's not very readable though - frankly, I'd stick with the one you're already using!@a=qw(1 2 3 4); @b=qw(1 2 3 4); @c=(); $c[@c] = $a[@c] + $b[@c] while defined $a[@c] and defined $b[@c]; print "@c \n";
andy.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Summing the elements of multiple arrays into a new array
by mull (Monk) on Oct 31, 2001 at 23:37 UTC | |
by andye (Curate) on Nov 01, 2001 at 17:37 UTC | |
by blakem (Monsignor) on Nov 02, 2001 at 01:25 UTC | |
by ichimunki (Priest) on Nov 02, 2001 at 03:09 UTC | |
by blakem (Monsignor) on Nov 02, 2001 at 05:17 UTC |