in reply to Processing arrays 2 elements at a time (TIMTOWTDI)

Update: D'oh! Silly coder, read the whole article before posting. Ignore me, I'm being redundant.


I'm surprised that nobody mentioned splice, as merlyn suggested here:

while(my @pair = splice @$r, 0, 2) { push @$r2, \@pair; }

--
The hell with paco, vote for Erudil!
:wq