S_Shrum has asked for the wisdom of the Perl Monks concerning the following question:
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
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: DBI w/ AnyData...works except on a couple of files...
by princepawn (Parson) on Mar 01, 2002 at 21:23 UTC | |
by S_Shrum (Pilgrim) on Mar 07, 2002 at 06:57 UTC | |
by princepawn (Parson) on Mar 08, 2002 at 21:35 UTC | |
|
Re: DBI w/ AnyData...works except on a couple of files...
by S_Shrum (Pilgrim) on Mar 07, 2002 at 07:41 UTC | |
by jZed (Prior) on Mar 22, 2002 at 06:19 UTC | |
by thoglette (Scribe) on Mar 13, 2003 at 07:58 UTC | |
|
Re: DBI w/ AnyData...works except on a couple of files...
by rinceWind (Monsignor) on Feb 27, 2002 at 11:50 UTC |