in reply to A bug in DBD::CSV?
#!/usr/bin/perl use strict; no warnings; use DBI; my $file = shift; my $dbh = DBI->connect('DBI:CSV:f_dir=.;') or die "Cannot connect $!"; $dbh->{'csv_tables'}{'current_table'} = { file => $file, quote_char => '~' }; my $sth = $dbh->prepare(q{SELECT * FROM current_table}); $sth->execute(); while ( my @row = $sth->fetchrow_array ) { print @row; print "\n"; }
BUG FOUND When this is the data file it works fine!!!~Style Name~ ~5dr Crew Cab 130" WB 2WD LS~
Deduction: The bug is DBD::CSV breaking if there is an occurance of a double quotes within a non-standard quote character of '~', (so what is the point of using quote_char) ?~Style Name~ ~5dr Crew Cab 130~
|
|---|