in reply to LOCK TABLES using Perl in MySQL
$sth = $dbh->prepare("LOCK TABLES tablename WRITE"); unless ($sth->execute()) { die $dbh->errstr() } #sql queries here $sth = $dbh->prepare("UNLOCK TABLES"); unless ($sth->execute()) { die $dbh->errstr() } [download]