in reply to Re: How do I loop through a list two or more elements at a time?
in thread How do I loop through a list two or more elements at a time?

You can also use natatime from List::MoreUtils:
my @x = ('a' .. 'g'); my $it = natatime 2, @x; while (my ($x,$y) = $it->()) { print "$x $y\n"; }
  • Comment on Re: Answer: How do I loop through a list two or more elements at a time?
  • Download Code