my $dbh = DBI->connect(q{DBI:CSV:}); $dbh->{'csv_tables'}->{'mytable'} = { 'file' => 'mytable.csv', 'sep_char' => "\t" 'col_names' => ["col_a", "col_b", "col_c"] }; my $sth = $dbh->prepare("SELECT m.col_a, m.col_c FROM mytable m"); $sth->execute; my @rows; while (my $row = $sth->fetchrow_hashref) { push @rows, $row; }