http://www.perlmonks.org?node_id=938185


in reply to Re: How to code this?
in thread How to code this?

Howdy!

Given subsequent clarifications, I think this may be a very effective approach. If you look at the first n items in the array, you will get the entire group each time. Once you have handled a set, shift the first element off and any subsequent empty elements. Lather, rinse, repeat.

yours,
Michael