$sth = $dbh->prepare('UPDATE sometable SET value1=? WHERE value2=? OR value2=?'); $sth->execute("something with \n in it", "something else which incidentally has a \n in it", "something else which incidentally has \r\n in it");