my $table_statement = "SELECT table_name FROM ${database}.information_schema.tables"; #### my %tablenames = (); while ((@row) = $sth->fetchrow_array) { $tablenames{$row[0]}++; }