in reply to Traversing succeding sets of an array

What about something like this?
do_something_with($elements[$_-1], $elements[$_]) foreach (1 .. $#elements);