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;
In reply to Re: Splitting a string
by Roy Johnson
in thread Splitting a string
by lampros21_7
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |