#!/usr/bin/perl use strict; no warnings; use DBD::CSV; my $file = shift; my $dbh = DBI->connect('DBI:CSV:f_dir=.') or die "Cannot connect $!"; $dbh->{'csv_tables'}{'current_table'} = { file => $file, quote_char => '~', eol=> "\r\n" }; my $sth = $dbh->prepare(q{SELECT * FROM current_table}); $sth->execute(); while ( defined ( my @row = $sth->fetchrow_array ) ) { print @row; } print $sth->errstr(); #### DBD::CSV::st fetchrow_array failed: Attempt to fetch row from a Non-SELECT statement [for Statement "SELECT * FROM current_table"] at ./col_proc.pl line 13. DBD::CSV::st fetchrow_array failed: Attempt to fetch row from a Non-SELECT statement [for Statement "SELECT * FROM current_table"] at ./col_proc.pl line 13. DBD::CSV::st fetchrow_array failed: Attempt to fetch row from a Non-SELECT statement [for Statement "SELECT * FROM current_table"] at ./col_proc.pl line 13. DBD::CSV::st fetchrow_array failed: Attempt to fetch row from a Non-SELECT statement [for Statement "SELECT * FROM current_table"] at ./col_proc.pl line 13. #### evan@dealermade:/var/chrome/NVDv2_US_EN$ ./col_proc.pl problem.txt 282198 2007700803 16139 2007 1 ~ZMB67~ ~ZMB67~ ~2dr Conv~ ~Y~ 21319.80evan@dealermade:/var/chrome/NVDv2_US_EN$ vim problem.txt