$str = ' say as simple as a b c :-) '; $str =~ s/^\s+|\s+$//g, $str =~ tr/ /_/s, print $str;
In reply to Re: Re: Replacing multiple spaces into one character?
by tachyon
in thread Replacing multiple spaces into one character?
by r.joseph
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |