use DBI; use strict; my $dbh = DBI->connect("DBI:CSV:f_dir=./;"); my $param1 = undef; my $param2 = 'test'; my $sql_create = ' create table mytable( field1 text, field2 text )'; my $sql_insert = ' INSERT INTO mytable( field1, field2 ) VALUES (?,?)'; my $sth_insert = $dbh->prepare($sql_insert); $dbh->do($sql_create); $sth_insert->execute($param1, $param2); print "field1=",$dbh->selectrow_array("select field1 from mytable");