in reply to perlish mapping a list to triples

If you don't want to destroy the original array with splice then you could do

my @a = 1..30; my @b = map{ [ @a[ $_ .. $_ +2 ] ] } map{ $_ *3 } 0 .. $#a/3; print "@$_" for @b;; 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30

Examine what is said, not who speaks.
"Efficiency is intelligent laziness." -David Dunham
"Think for yourself!" - Abigail