use strict; use DBI; my $dbh = DBI->connect('dbi:AnyData:'); $dbh->func( 'test', 'CSV', 'test.csv', {sep_char => ',', eol => "\n", col_names => 'number,name', }, 'ad_catalog', ); my $sth = $dbh->prepare("SELECT number, name FROM test ORDER BY name"); $sth->execute(); while ( my $row = $sth->fetch ) { print "@$row\n"; }