my $quoted_table = $dbh->quote_identifier($table); my $sth = $dbh->prepare(qq{SELECT * FROM $quoted_table}) or die "Can't prepare statement: $DBI::errstr";