$dbh1->connect("to db2 database"); $dbh2->connect("to sybase database"); $sth1=$dbh1->prepare("select apples, bananas from fruit_salad"); $sth2=$dbh2->prepare("insert snack (apples, bananas) values (?,?)"); $sth1->execute(); while (@row=$sth1->fetchrow_array()) { $sth2->execute(@row); }