http://www.perlmonks.org?node_id=111667


in reply to How do I lock tables using DBI and mySQL?

See the Lock Tables syntax in the MySQL documentation. Then wrap each sql query inside of something like:
$dbh->do(" ... ");