my $mystring = "perl monks"; # Oops, I thought it was supposed to span words. Thanks for the heads-up, kwaping #(my $splitted = $mystring) =~ s/(?<=.)(\S)\s*(?=\S)/$1 $1/g; (my $splitted = $mystring) =~ s/(?<=\S)(\S)(?=\S)/$1 $1/g; print $splitted;