You could use a statement modifier:
$list1[$_] += $list2[$_] for 0..$#list1;
Assignment to a list of variables:
($some_value, $some_other_value, $this_var, $that_var) = @array;
In reply to Re: Adding two lists together
by shmem
in thread Adding two lists together
by markkawika
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |