my @array = (1 .. 55); while ( my @chunk = splice @array, 0, 20 ) { print "<@chunk>\n"; }