http://www.perlmonks.org?node_id=307034


in reply to Knowing if an Operation is Successful in MySql

This will tell you if your command ran successfully.

if ( $dbh->do( $command ) ) { &success; } else { &failure; }

This will tell you if you actually inserted anything:

if ( 0 + $dbh->do( $command ) ) { &success; } else { &failure; }