# do we need an insert or an update? my $row_checker = $dbh -> prepare("select count(col1) from table1 where col1 = ? and col2 = ? and col3 = ?"); my $inserter = $dbh -> prepare("insert into table1 (col1, col2, col2) values (?, ?, ?)");my $upda ter = $dbh -> parepare("update table1 set col1 = ?, col2 = ?, col3 = ? where col1 = ? and col2 = ? and col3 = ?");