#!/usr/bin/perl use strict; use warnings; use DBI; my $dbh = DBI->connect('dbi:AnyData(RaiseError=>1):'); # The default is to treat the first line # of the file as the list of column names # If you just want to select the women $dbh->func( 'people', 'CSV', '/home/user1/file.csv', { sql => "SELECT name FROM people WHERE genre='F'" }, 'ad_import' ); # Print the result as a HTML table print $dbh->func( 'people', 'HTMLtable', 'ad_export' ); # or save it in a file $dbh->func( 'people', 'HTMLtable', '/home/user/mytab1.html', 'ad_export' );