my @d; for my $i (0 .. $length-$n) { $d[$i] = substr($field, $i*$n, $n) }