transaction_select $dbh; transaction { for (1..10) { my $sth = $dbh->prepare(...); $sth->execute() or rollback; } };