in reply to if table exists (DBI)

Check your MySQL document, as I know ORACLE has those tables used by admin, one of them holds a list of all tables, domains. If MySQL provide this table, then you can just query it. Perl is not really responsible for this.