$dbh->begin_work; foreach (@$bp_aref) { $bind_parms = $_; my $ra = $sth->execute(@$bind_parms); # $ra is zero # records are still in the db # I need to keep a count of how many rows are going to be deleted, for each delete statement $count[$i] += $sth->rows; # returns zero } $dbh->commit unless $skip_trans; # now records are not in db