<?xml version="1.0" encoding="windows-1252"?>
<node id="996916" title="perl hash to CSV using Text::CSV_XS" created="2012-10-02 16:44:49" updated="2012-10-02 16:44:49">
<type id="115">
perlquestion</type>
<author id="996913">
perl_war</author>
<data>
<field name="doctext">
&lt;p&gt;
I wanted to convert a perl hash to csv.
&lt;/p&gt;&lt;p&gt;
I realize this is easy using Text::CSV::Slurp but performance is better in Text::CSV_XS .
&lt;/p&gt;&lt;p&gt;
In Text::CSV::Slurp I would use create(input=&gt;$object) function.
&lt;/p&gt;&lt;p&gt;
In Text::CSV_XS I would use print ($io, $colref);
I would have to go through array of hashes line by line and use the above function.
&lt;/p&gt;&lt;p&gt;
What would be more computationally efficient?
&lt;/p&gt;</field>
</data>
</node>
