use DBI; use Data::Dumper; use strict; my $dir = '.'; my $file = 'simple_csv'; my $cols = [qw(one two three)]; my $dbh = DBI->connect( "DBI:CSV:f_dir=$dir;csv_eol=\n;csv_sep_char=:;", {RaiseError=>1}, ); $dbh->{csv_tables}->{$file} = { col_names => $cols }; my $sth = $dbh->selectall_arrayref(" select one, two, three from simple_csv order by two "); print Dumper $sth;