title: In Perl, how can I write and read CSV file composed from a key and array?
body: <p>I have a problem to write and read properly a CSV file composed of name(key) and array of values:</p>
  
  <pre><code>testarray.csv
  
  foo1 ,0,0,0,0,1
  foo2 ,1,0,0,0,1
  foo3 ,3,4,5,6,7
  .
  .
  .
  </code></pre>
  
  <p>I need to represent that file as follows:</p>
  
  <p><code>foo#</code> will be the key and the five following numbers will be its array.</p>
  
  <p>What is the simple way to conduct that and to recall it for a use (not with Dumper)? How can I use a varible from an array of a specific key?</p>
  
  <p>E.g., </p>
  
  <pre><code>print $hsh{'foo1'}[4];
  </code></pre>