title: Perl: With Text::CSV can I write out a hash ref?
body: <p>I have a Perl script that reads in a CSV file, changes the columns names of the original,  adds new ones (output CSV column names are stored in the array,  header_line), adds new field values for each row read, and then writes out a new CSV file. </p>
  
  <p>Thanks to a comment by @harleypig on my last <a href="https://stackoverflow.com/questions/4156483/perl-create-a-hash-from-an-array">question</a>, I'd like to use: </p>
  
  <pre><code>$csv_i-&gt;column_names( @header_line);
  $row = $csv_i-&gt;getline_hr($fh_i)
  </code></pre>
  
  <p>because this lets me easily access row fields using meaningful names rather than magic numbers. For example:</p>
  
  <pre><code>$row-&gt;{ 'name' } = get_fullname($row-&gt;{ 'name' });
  </code></pre>
  
  <p>The only problem now is, what's the best way to write out the line? Previously, I used:</p>
  
  <pre><code>$csv_o-&gt;print( $fh_o, $row ); 
  </code></pre>
  
  <p>But that fails because it expects an array ref. How do I write out the hash ref using the csv_o object? </p>