use DBI; $dbh=DBI->connect('dbi:mysql:foo','root',''); $sth=$dbh->prepare("select * from foo"); $sth->execute(); $sth->finish();