title: mysql insert on duplicate key update know whether it took place
body: <p>In an application I'm building I use a lot of insert on duplicate key updates. My issue is that in my application I kind of need to know whether or not it was an insert or an update so my code can make the appropriate decisions. Does anyone know how I can test for this?</p>
  
  <p>I'm using perl's DBI module if anyone knows a way specific to that. Thanks!</p>