use DBI; my $dbh = DBI->connect("DBI:SQLite:dbname=prova.db","",""); $sth = $dbh->prepare("select * from joe1test"); $sth->execute; $numRows = $sth->rows; print "Righe : $numRows\n";