I see you got your answer as to what was happening in your code snippet from BrowserUk.
I don't know what context you want to use this in but the pairwise() function in List::MoreUtils may be helpful.
-- Ken
In reply to Re: arrays: shifting in while loop
by kcott
in thread arrays: shifting in while loop
by ivanthemad
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |