in reply to Reading DB

And your Perl question is?

Most RDBMSs I've seen have built-in capability to list tables, and to list columns of a table, yes. Exacly how that's done varies.