my $string = "PERLPERLPEBLPEBLPERL"; my @answer = ( $string =~ m/(.{4})/g ); print "@answer\n";