my $step=2; my $pos=0; while( $pos <= 10) { my @list=@t[$pos..$pos+$step-1]; # ... $pos+=$step; }