I have a number (~25, all Pipe delimited) of flat-file databases that I use to store my site data in. I created a script to access the data and display the results but I have hit a strange impass.

For most of my databases, the script works great. However, when I attempt to do any queries such as a "Select *" or even if I specify a SELECT query with field names on , for example, the following file:

http://www.shrum.net/flying_sites.dat

I get the following msg in the server error log:

Execution ERROR: Can't use string ("CAN'T FIND COLUMN NAMES ON FIRST") as an ARRAY ref while "strict refs" in use at c:/Perl/site/lib/AnyData.pm line 126, <GEN0> line 2.

This can't be the *exact* problem as the first line of the database is the field names.

Out of all my flat-file databases, I am getting this error for about 5 of them. I can't figure it out. I am assuming that once I figure out the problem with one db, the rest *might* fall in line. I'm thinking that the problem may be in the formatting of CR/LF of the file itself (something I'm a bit ignorant about and don't know how to check). Any help would be apprechiated.

TIA

======================
Sean Shrum
http://www.shrum.net


In reply to DBI w/ AnyData...works except on a couple of files... by S_Shrum

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.