Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re: Replacing multiple spaces into one character?

by thunders (Priest)
on Oct 09, 2001 at 19:01 UTC ( [id://117756] : note . print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    1 while $str =~ s/[ ]+/_/;
    
  2. or download this
    1 while $str =~ s/[ ]+/ _ /;