my $sth2 = $dbh->prepare("select count(*) from ?"); $sth2->execute($tablename);