my @groups = unpack "a$n" x ( ( length($string) / $n ) - 1 ) . "a*", $string;