use strict; use warnings; use DBI; my $dbh = DBI->connect("DBI:CSV:f_dir=/tmp"); $dbh->trace(2); $dbh->do("CREATE TABLE a (id INTEGER, name CHAR(10))"); $dbh->do("INSERT INTO a (id, name) values (?,?)", {}, 1, 'one'); $dbh->selectall_arrayref("select * from a where id < ?",{},2); my $sth = $dbh->prepare("select * from a where id < ?"); $sth->execute(2); use Data::Dumper; warn Dumper $sth->fetchall_arrayref();