my @x = ('a' .. 'g'); my $it = natatime 2, @x; while (my ($x,$y) = $it->()) { print "$x $y\n"; }
In reply to Re: Answer: How do I loop through a list two or more elements at a time?
by Anonymous Monk
in thread How do I loop through a list two or more elements at a time?
by moodster
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |