Check with the following code
$str ="Any help would be greatly appreciated + "; $str =~ s/(\s)+/$1/g; print $str;
Your Attempt May Fail, But Never Fail To Make An Attempt
In reply to Re: Replace consecutive whitespaces with single whitespace
by lakshmananindia
in thread Replace consecutive whitespaces with single whitespace
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |