my $rowcount = $update_stm->execute(@args); if ($rowcount == 0) { $insert_stm->execute(@other_args); }