Or you could wait Perl 6 :)my $max = ($#foo > $#bar) ? $#foo : $#bar; # or we can assert they have the same size? @foobar = map { $foo[$_] + $bar[$_] } (0..$max);
In reply to Re: Summing the elements of multiple arrays into a new array
by larsen
in thread Summing the elements of multiple arrays into a new array
by djw
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |