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.
In reply to Re: Summing the elements of multiple arrays into a new array
by andye
in thread Summing the elements of multiple arrays into a new array
by djw
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |