eval { do some transcations $dbh->commit() }; $dbh->rollback() if $@;