use strict; use warnings; my $str = "computer"; my @parts = $str =~ /(?=(...))/g; print "@parts";