Another way to do it:
$ perl -le' my $str = "Any help would be greatly appreciated"; $str =~ tr/ //s; print $str; ' Any help would be greatly appreciated
In reply to Re: Replace consecutive whitespaces with single whitespace
by jwkrahn
in thread Replace consecutive whitespaces with single whitespace
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |