in reply to Re: Re: global whitespace delete
in thread global whitespace delete

I'm not sure where BrentDax got the homework idea. A little quick to judge, is all, I suppose.

Your comparison is peculiar. You might want to specify a set instead of \s+, such as:
s/((?:"[^"]*?")|(?:'[^']*?'))|([ \t]+)/$2?" ":$1/ge;
The set of space and tab is probably more efficient than asking for more than you want, and then discarding the extras. \s by default contains tab, space, and newline. Since you have no use for newline, just don't ask for it.