|
|
| go ahead... be a heretic | |
| PerlMonks |
global whitespace deleteby physi (Friar) |
| on Jul 31, 2001 at 07:16 UTC ( [id://101086]=perlquestion: print w/replies, xml ) | Need Help?? |
This is an archived low-energy page for bots and other anonmyous visitors. Please sign up if you are a human and want to interact.physi has asked for the wisdom of the Perl Monks concerning the following question:
I currently got a problem with the substitution of whitespaces. On a single line I want to reduce more then one whitespace to exactly one . s/\s+/ /g is doing this, but there is a little trap :) The substitution should not be made, if the whitespaces are inside a ' ' or " " block. Can anybody help with that, or is this not possible in a single substitute line ? Any help is welcome.
Back to
Seekers of Perl Wisdom
|
|
||||||||||||||||||||||||||||||||||||