I had a fuss with DBI too, when I wanted to insert a lot of rows. If a row was already there, DBI would spit out errors (as it should), but it was not what I wanted. I didn't care if the row couldn't be inserted, I only wanted them in there once anyways. I used the following to solve it (note the OR IGNORE):
$dbh->prepare_cached("INSERT OR IGNORE INTO table VALUES (?,?,?,?)");