You really, really, really don't want to do that, unless you don't mean what I think you mean. As cavac suggests some sample code showing what you are trying to do would help a lot. Maybe this is a useful starting point:

use strict; use warnings; use Text::CSV; use Data::Dumper; my $csvFile = <<CSV; A,B,C,D,E,F,G a,b,c,d,E',f,g a,b,c,D',e,f,g a,b,c,d,E',f,g a,b,c,d,E',f,g a,b,c,D',e,f,g CSV open my $fIn, '<', \$csvFile; my $csv = Text::CSV->new(); $csv->column_names($csv->getline($fIn)); my $arrayref = $csv->getline_hr_all($fIn); print Dumper($arrayref);

Prints:

$VAR1 = [ { 'E' => 'E\'', 'G' => 'g', 'B' => 'b', 'D' => 'd', 'C' => 'c', 'A' => 'a', 'F' => 'f' }, { 'C' => 'c', 'F' => 'f', 'A' => 'a', 'E' => 'e', 'B' => 'b', 'D' => 'D\'', 'G' => 'g' }, { 'D' => 'd', 'B' => 'b', 'G' => 'g', 'E' => 'E\'', 'F' => 'f', 'A' => 'a', 'C' => 'c' }, { 'G' => 'g', 'D' => 'd', 'B' => 'b', 'E' => 'E\'', 'A' => 'a', 'F' => 'f', 'C' => 'c' }, { 'C' => 'c', 'A' => 'a', 'F' => 'f', 'E' => 'e', 'G' => 'g', 'B' => 'b', 'D' => 'D\'' } ];
Optimising for fewest key strokes only makes sense transmitting to Pluto or beyond

In reply to Re: Building a dynamic array or some other method? by GrandFather
in thread Building a dynamic array or some other method? by CAdood

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.