title: Removing CRLF (0D 0A) from string in Perl
body: <p>I've got a Perl script which consumes an XML file on Linux and occasionally there are CRLF (Hex 0D0A, Dos new lines) in some of the node values which. </p>
  
  <p>The system which produces the XML file writes it all as a single line, and it looks as if it occasionally decides that this is too long and writes a CRLF into one of the data elements. Unfortunately there's nothing I can do about the providing system.</p>
  
  <p>I just need to remove these from the string before I process it. </p>
  
  <p>I've tried all sorts of regex replacement using the perl char classes, hex values, all sorts and nothing seems to work. </p>
  
  <p>I've even run the input file through dos2unix before processing and I still can't get rid of the erroneous characters. </p>
  
  <p>Does anyone have any ideas?</p>
  
  <p>Many Thanks, </p>