in reply to Re: Scrubbing XML
in thread Scrubbing XML

Well the problem with dos2unix or anything that just removes the carriage return is that I'm left with extra line feeds. I need to when a I see a <CR> also remove the <LF> without removing all the other <LF>'s.

Replies are listed 'Best First'.
Re^3: Scrubbing XML
by anonymized user 468275 (Curate) on Apr 18, 2011 at 16:24 UTC
    I anticipated that, hence the hardcoded regexp idea, but I just remembered something else -- you might need to set $/ = undef() as well as the hardcoded regexp, to prevent the CR and LF being split across a line break.

    Update: and if using perl -ne, that would have to be done in a BEGIN{ } block

    One world, one people