Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re: Re: Replacing multiple spaces into one character?

by tachyon (Chancellor)
on Oct 09, 2001 at 07:24 UTC ( [id://117634] : note . print w/replies, xml ) Need Help??


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;