title: Replace newline in quoted strings in huge files
body: <p>I have a few huge files with values seperated by a pipe (|) sign.
  The strings our quoted but sometimes there is a newline in between the quoted string.</p>
  <p>I need to read these files with external table from oracle but on the newlines he will give me errors. So I need to replace them with a space.</p>
  <p>I do some other perl commands on these files for other errors, so I would like to have a solution in a one line perl command.</p>
  <p>I 've found some other similar questions on stackoverflow, but they don't quite do the same and I can't find a solution for my problem with the solution mentioned there.</p>
  <p>The statement I tried but that isn't working:</p>
  <pre><code>perl -pi -e 's/&quot;(^|)*\n(^|)*&quot;/ /g' test.txt
  </code></pre>
  <p>Sample text:</p>
  <pre><code>4454|&quot;test string&quot;|20-05-1999|&quot;test 2nd string&quot;
  4455|&quot;test newline
  in string&quot;||&quot;test another 2nd string&quot;
  4456|&quot;another string&quot;|19-03-2021|&quot;here also a newline
  &quot;
  4457|.....
  </code></pre>
  <p>Should become:</p>
  <pre><code>4454|&quot;test string&quot;|20-05-1999|&quot;test 2nd string&quot;
  4455|&quot;test newline in string&quot;||&quot;test another 2nd string&quot;
  4456|&quot;another string&quot;|19-03-2021|&quot;here also a newline &quot;
  4457|.....
  </code></pre>