in reply to Re: Replacing multiple spaces into one character?in thread Replacing multiple spaces into one character?
$str = ' say as simple as a b c :-) '; $str =~ s/^\s+|\s+$//g, $str =~ tr/ /_/s, print $str; [download]