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"; } #### 2 Alfred 3 Barry 2 Bob 1 Charlie 1 Edward