Try ...
@a = map { $a[$_] + $b[$_] } 0 .. $#b;... or ...
my $i = 0; @a = map { $a[$i++] + $_ } @b;
In reply to Re: How can I access the index variable in map?
by Kanji
in thread How can I access the index variable in map?
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |