@a1 = qw(1 2 3)
@a2 = qw(1 2 3 4 5)
looking have the resultant of a calculation between a1 and a2 be inserted as the value of a2[0]. example would be 1+1 = 2 going into a2[0] as 2, then the next calculation would be 2+2 (a2[0] + a1[1]) resulting in a2[0] = 4, then 4+3 (a2[0]+a1[2]) resulting in a2[0] = 7, then move on to the next line in a2 and perform the same function against a1.
when all said and done the result would be from print @a2;
7 8 9 10 11
my $a2 = map { my $a = $_; map { $_ + $a } @a1 } @a2;as a nested map but it does not work. I've tired foreach loops but there I can not break the boundry of having to list each item from @a1foreach (@2) {$_ = $a1[0] + $_;$_ = $a1[1] + $_;$_ = $a1[2] + $_; }