my $CPU = 'Intel(R) Xeon(R) CPU X5660 2.80GHz'; $CPU =~ s/\s+/ /g; print "<$CPU>\n"; # prints <Intel(R) Xeon(R) CPU X5660 2.80GHz>
Have a look at perlrequick and perlretut.
In reply to Re: Deleting intermediate whitespaces, but leaving one behind each word
by haukex
in thread Deleting intermediate whitespaces, but leaving one behind each word
by Feneden
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |