<?xml version="1.0" encoding="windows-1252"?>
<node id="1003041" title="Re: Output to another file help" created="2012-11-08 20:29:53" updated="2012-11-08 20:29:53">
<type id="11">
note</type>
<author id="880879">
space_monk</author>
<data>
<field name="doctext">
Please in the name of whatever deity/deities you worship, stop using "split" to break up lines of CSV files and use &lt;a href="http://search.cpan.org/~makamaka/Text-CSV-1.21/lib/Text/CSV.pm"&gt;Text::CSV&lt;/a&gt; or a similar library instead.

&lt;p&gt;In the particular example, the original program is reading in an address, which is almost certain to contain a comma somewhere, and the normal way round that is to quote the field. &lt;b&gt;split&lt;/b&gt; won't handle this, but CSV parsing libraries such as Text::CSV will take it in their stride.

&lt;!-- Node text goes above. Div tags should contain sig only --&gt;
&lt;div class="pmsig"&gt;&lt;div class="pmsig-880879"&gt;
A Monk aims to give answers to those who have none, and to learn from those who know more.
&lt;/div&gt;&lt;/div&gt;</field>
<field name="root_node">
1002984</field>
<field name="parent_node">
1002984</field>
</data>
</node>
