eval { $dbh->do($statement); $dbh->commit(); } if ($@) { $dbh->rollback(); die $@; }