SPUG: DBD::CSV Problems

Jim Clark entropy at zipcon.com
Tue Apr 12 20:06:20 PDT 2005


Hi All,
  I feel a brief history is in order before I get to 
my problem.  

I retired in 2002 and have not cut a line of production
code since July of that year.  A former co-worker asked me
to crunch some data for the small business he started.  Being
out of the workforce for a while, I'm definitely not
up to date with perl so I may ask stupid questions.

That being said, here is my problem.

I have some .csv files I need to read, parse and 
write.  I planned on using DBI/DBD.  I have been 
unable to open the csv files with a connect.  
I have a lot of experience with DBD::Oracle
but am at an empass with DBD::CSV.  I'm not looking
forward to writing code to parse a csv file.

Here is where I'm at...

OS RH 9.2
Perl 5.8.0
DBI/DBD drivers installed within the last month
SQL::Statement is installed
Text::CSV_XS is installed

Here is the connect sub...

sub connect_to_yahoo
{

  my $dbh = DBI->connect( "DBI:CSV:f_dir=/home/jc/data/yahoo.csv" ) ;

  return  ( $DBI::err ? 0 : $dbh ) ;

}

and the error message

No such directory '/home/jc/data/yahoo.csv' at ./dbtest.pl line 27

The directory and the file definitely exist.  

Any help would be greatly apprecieated.

Thanks,

JC





-- 
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.308 / Virus Database: 266.9.7 - Release Date: 4/12/2005



More information about the spug-list mailing list