in reply to Deleting intermediate whitespaces, but leaving one behind each word

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.

  • Comment on Re: Deleting intermediate whitespaces, but leaving one behind each word
  • Download Code

Replies are listed 'Best First'.
Re^2: Deleting intermediate whitespaces, but leaving one behind each word
by Feneden (Acolyte) on Dec 06, 2017 at 12:50 UTC
    Hello, i also appreciate your help and will try this solution too. Thanks for the fast answer :)