List::MoreUtilsuse 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 ];
In reply to Re^2: Adding two lists together
by toolic
in thread Adding two lists together
by markkawika
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |