Our program for today...
5: $dbh = DBI->connect('user', 'passwd', { RaiseError => 1 });
7: $upd = $dbh->prepare("UPDATE prices SET price=? WHERE prod=?");
8: $ins = $dbh->prepare("INSERT INTO prices (prod,price) VALUES(?,?)");
9: $rows = $upd->execute(42, "Widgets");
10: $ins->execute("Widgets", 42) if $rows == 0;