in reply to Scrubbing XML

"\n" is usually ignored in regular expressions, unless the /s flag is set at the end (as you would the /g flag).
However in this case I would have thought that s/\r//g would be sufficient.

Update: although maybe s/\r\n?//s; is needed here (I'm having difficulty in reproducing the data here).

Replies are listed 'Best First'.
Re^2: Scrubbing XML
by Your Mother (Archbishop) on Apr 18, 2011 at 16:41 UTC

    \n itself isn't ignored, what you're thinking of is . which doesn't include \n without the s flag.