The case you have provided for using the TEXT::CSV module is very compelling and gives me new reason to dig deeper into the module pool for tools. Very helpful, much appreciated.

I managed to overlook the construction of @ArrayInMemory as an AoA which was the source of my confusion. In my zeal to complete a functional prototype I did not construct this array as an AoA, even though it would make sense from a structural standpoint to do so.

The array I am currently using looks something like this:

index1 - "field 1"/"field 2"/"field3" index2 - "field 21"/field 22/"field23"

A fun exercise, for a learner like myself, might be to benchmark the various data structures for my particular application.

Thank you for all the detailed responses with various methods to move this data. I was shocked to see so few code examples using the pg_putcopydata handle, and I hope others might benefit from the exploration of this simple problem as well. PIPE! How does one (me) so easily forget about pipes and shell scripts? I feel like I should take down my list of UNIX tenants from my wall, in shame...

I work at a game development studio with many programmers who only have experience with Perl from their days in a classroom. I find communities such as Perl Monks to be invaluable in my pursuit of data wrangling, and thank you all again!


In reply to Re^4: DBD:Pg pg_putcopydata by LiquidT
in thread DBD:Pg pg_putcopydata by LiquidT

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.