in reply to Processing pairs of values from even-sized array

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.