use strict; use warnings; use 5.012; use List::MoreUtils qw/each_array/; my @first = qw/1 2 3 4 5 6/; my @second = qw/a b c d e f/; my $ea = each_array(@first, @second); while ( my ($f, $s) = $ea->() ) { say "First: $f -> second: $s" }