#!/opt/perl/bin/perl -w use strict; use List::MoreUtils qw(natatime); my @names = qw( a b c d e f ); my $it = natatime( 2, @names ); while (my @items = $it->()) { print "@items\n"; };