This can be extended to take more than one element at a time: Was: while (my($age, $sex, $location) = splice @whatever, 0, 3) { ... } Now: for @whatever -> $age, $sex, $location { ... } (Except the for version does not destroy the array.)