my $string = join '', a..z; my @fields = grep {$_} split /(.{3})/, $string; print "@fields\n"; __END__ abc def ghi jkl mno pqr stu vwx yz