use DBI ; $dbh1 = DBI::connect(...) ; $dbh2 = DBI::connect(...) ; $sth1 = $dbh1->prepare(...) ; $sth1->execute(...) ; @row = $sth->fetchrow_array(...) ; $dbh2->do(..., @row) ;