in reply to Colorapt for Ubuntu/Debian

A couple of suggestion

Comment Comment Comment

You can't comment enough.

I like to define what the regex is looking for specifically

s/ \+/ /g; # Remove multiple spaces
should be
OLD s/\s+/\s/g;
UPDATE : sorry it should be
NEW s/\s+//g;

Replies are listed 'Best First'.
Re^2: Colorapt for Ubuntu/Debian
by Anonymous Monk on Aug 02, 2015 at 00:42 UTC
    When I try that, I get "Unrecognized escape \s passed through at ./get.pl line 36."
      AFAIK, \s has been introduced around version 5.10, so it might help if you could upgrade your perl (or, if it's the "system perl", use a mechanism like perlbrew…)
      Big Oops! Sorry, apparently I was not yet awake enough when I wrote this

        HUMBUG!

        $ perl4.036 -Ilib -w -le '$_="abc de f";s/\s+//g;print' abcdef

        It is just that \s is not allowed in the replacement part. What would you expect?


        Enjoy, Have FUN! H.Merijn