in reply to Re: Adding two lists together
in thread Adding two lists together

... and to suppress the annoying warnings:
use strict; use warnings; use Data::Dumper; use List::MoreUtils qw(pairwise); my @list1 = (1 .. 5); my @list2 = (11 .. 15); { no warnings; pairwise { $a += $b } @list1, @list2; } print Dumper(\@list1); __END__ $VAR1 = [ 12, 14, 16, 18, 20 ];
List::MoreUtils