List::MoreUtils has pairwise and natatime, the former which works like a two-at-a-time map and the later makes an iterator that you kick in a while loop.
Example: my @x = ('a' .. 'g'); my $it = natatime 3, @x; while (my @vals = $it->()) { print "@vals\n"; } This prints a b c d e f g
The cake is a lie.
The cake is a lie.
The cake is a lie.
In reply to Re: Processing pairs of values from even-sized array
by Fletch
in thread Processing pairs of values from even-sized array
by rovf
For: | Use: | ||
& | & | ||
< | < | ||
> | > | ||
[ | [ | ||
] | ] |