use DBI; $dsn = "dbi:Oracle:host=;sid=ORA8I;port=1521"; $user = ""; $password = ""; $dbh = DBI->connect($dsn, $user, $password, { RaiseError => 1, AutoCommit => 1}); $sth = $dbh->prepare("select count(*) from table_one"); $sth->execute(); $row1 = $sth->fetchrow_array; $sth = $dbh->prepare("select count(*) from table_two"); $sth->execute(); $row2 = $sth->fetchrow_array; print "$row1, $row2 \n"; $sth->finish(); $dbh->disconnect();