Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re^3: DBD::CSV::prepare() problems

by remiah (Hermit)
on Aug 25, 2012 at 10:32 UTC ( #989714=note: print w/ replies, xml ) Need Help??


in reply to Re^2: DBD::CSV::prepare() problems
in thread DBD::CSV::prepare() problems

Hello Polelo

I tried with my FreeBSD but it says nothing for filename. No error message, no warnings.

#!/usr/bin/perl use strict; use warnings; use DBI; my $dsn="dbi:CSV:"; my $dbh=DBI->connect($dsn, "","",{ f_encoding => "utf8", f_dir => "./", })or die DBI->errstr; $dbh->{csv_tables}->{t1} = { 'file' => '17_Trx_22Aug2012_0405.csv', 'eol' => "\n", }; my $sth; $sth=$dbh->prepare("select * from t1"); $sth->execute; while( my $r = $sth->fetchrow_hashref){ print "$r->{item1},$r->{item2}\n"; } $sth->finish; $dbh->disconnect; #print version print "perl version =$]\n"; for (qw/DBI Text::CSV_XS SQL::Statement DBD::CSV/){ print "$_ ==>".$_->VERSION."\n"; }
versions of mine. How is yours?
perl version =5.012002
DBI ==>1.615
Text::CSV_XS ==>0.85
SQL::Statement ==>1.33
DBD::CSV ==>0.35


Comment on Re^3: DBD::CSV::prepare() problems
Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://989714]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others surveying the Monastery: (10)
As of 2015-07-06 22:46 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (84 votes), past polls