in reply to DBI data types
my $ins_sth = $dbh->prepare('INSERT INTO hobby (id,descr,item,latin) V +ALUES (?,?,?,?)')|| die $dbh->errstr; my $csvfile="/home/bradley/dbtest/item_instk.csv"; my $id = 1; open (CSV,"$csvfile"); while (<CSV>) { chomp; ($item,$descr,$latin) = split('/',$_); $ins_sth->execute( $id, $descr, $item, $latin )||die $dbh->err +str; ++$id; } close CSV;
I realize that this isn't a direct answer to your question, but I hope that it helps you make things go more smoothly.
Update:Thanks for the corrections runrig
/\/\averick
perl -l -e "eval pack('h*','072796e6470272f2c5f2c5166756279636b672');"
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: DBI data types
by runrig (Abbot) on Aug 21, 2001 at 23:18 UTC | |
by htoug (Deacon) on Aug 22, 2001 at 15:02 UTC | |
by Dalin (Sexton) on Aug 21, 2001 at 23:54 UTC |