in reply to perl-mysql question - rollback...
Your commit should be outside your first eval block, and put at the same indent level as rollback, so that you only commit if everything is okay, and rollback when something is wrong.