⭐ in reply to How can I access the index variable in map?
Try ...
... or ...
my $i = 0; @a = map { $a[$i++] + $_ } @b; [download]