in reply to Re^2: removing redundantwhitespace
in thread removing redundantwhitespace
should do it. This will not destroy leading and trailing whitespace; for that, you should use ikegami's solution, or read again the links in Re: removing redundantwhitespace.$string =~ s/\s*\n\s*/\n/g; $string =~ s/\s+/ /g;
|
|---|