Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot

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

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://989714]
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (10)
As of 2017-02-23 06:25 GMT
Find Nodes?
    Voting Booth?
    Before electricity was invented, what was the Electric Eel called?

    Results (340 votes). Check out past polls.