in reply to Querying databases in a loop

I don't think you can use placeholders for table names.
The problem is that the resulting string will be quoted, as you see in that nice error message:
error in your SQL syntax near ''common_dict' WHERE word = 'aa''

What you can do is use prepare_cached() in the following way
foreach my $x (@checklists) { my $sth = $dbh->prepare_cached("SELECT word FROM $x WHERE word = ? +"); $sth->execute($word); my $ret = $sth->fetchrow_hashref(); ...etc... }
This way you won't get a performance hit for re-preparing the SQL statement every time.

--perlplexer