#!/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"; }