$lock_res = 'unset'; $lock_str = "LOCK TABLES " . $table . " WRITE"; $lock_res = $dbh->do($lock_str); print "[lock_table] locking table <$table> result <$lock_res>\n";