<?xml version="1.0" encoding="windows-1252"?>
<node id="997937" title="Re^4: Export CSV v2" created="2012-10-09 03:00:25" updated="2012-10-09 03:00:25">
<type id="11">
note</type>
<author id="200365">
Tux</author>
<data>
<field name="doctext">
&lt;p&gt;Don't! [mod://Text::CSV_XS] and [mod://Text::CSV] both dynamically support &lt;c&gt;\r \x0D&lt;/c&gt;, &lt;c&gt;\n \x0A&lt;/c&gt;, or &lt;c&gt;\r\n \x0D\x0A&lt;/c&gt; even if they change per line if &lt;c&gt;eol&lt;/c&gt; is not specified.&lt;/p&gt;
&lt;p&gt;You &lt;i&gt;might&lt;/i&gt; want to do so on &lt;b&gt;output&lt;/b&gt; though:&lt;/p&gt;
&lt;code&gt;
    print "Writing to file: $ofile_name\n";
    $templateTextCopy =~ s{(?: \r\n | \r | \n )}
                              {\r\n}gx;  # &lt;-- make line ending consistent
    open my $fh, "&gt;", $ofile_name or die "$ofile_name: $!";
    print $fh $templateTextCopy;
    close $fh;
&lt;/code&gt;
&lt;!-- Node text goes above. Div tags should contain sig only --&gt;
&lt;div class="pmsig"&gt;&lt;div class="pmsig-200365"&gt;
&lt;br /&gt;
Enjoy, Have FUN! H.Merijn
&lt;/div&gt;&lt;/div&gt;</field>
<field name="root_node">
997896</field>
<field name="parent_node">
997902</field>
</data>
</node>
