$str = ' xx y z '; $str =~ s/(?<=\w)\s+(?=\w)/g; #replace only spaces between letters $str=~ tr/ //d; #delete leading and trailing spaces
pike
In reply to Re: Replacing multiple spaces into one character?
by pike
in thread Replacing multiple spaces into one character?
by r.joseph
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |