Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic

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?

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

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (10)
As of 2015-03-01 15:08 GMT
Find Nodes?
    Voting Booth?

    When putting a smiley right before a closing parenthesis, do you:

    Results (5 votes), past polls