Help for this page
my $sth=$dbh->prepare("DELETE FROM table WHERE ". join(" or ",map { "message_id = $_" } @MESSAGE_IDS));
while (@MESSAGE_IDS) { my @todel=splice @MESSAGE_IDS,0,10; ... join(" or ",map { "message_id = $_" } @todel)); $sth->execute; }