I recently encountered a problem with DBD::CSV that I thought I would ask about. I am in the process of migrating data from an Access database to an Oracle database. I had exported the Access tables to CSV files for my own reference, and then got the idea that I might be able to use DBD::CSV to read my text files and DBD::Oracle to write them to the Oracle database.

I was surprised to find that I could access CSV files that I had created with DBD::CSV, but not the text files I wanted to read. I finally determined the problem: DBD::CSV would not recognize files that did not have DOS-style (0d0a) line terminators. Being on a UNIX machine, I had to use the following filter to `fix' all of my CSV files:

perl -ne 's/\n/\r\n/; print;' OrigFile > FixedFile

My questions are:

  1. Is this a property of the module, or is this something I am doing incorrectly?
  2. If this is the way the module is intended to function, why? Is there a benefit that I'm not seeing?
  3. if this is a bug/shortcoming in the module, what is the proper way to request bug fixes/enhancements? Simply emailing the author, or is there a more controlled system?

Thanks for your time.


_______________
D a m n D i r t y A p e
Home Node | Email

In reply to DBD::CSV Question by DamnDirtyApe

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.