table_info()
$dbh->table_info($catalog, $database, $table, $type[, \%attri])
This function returns a statement handle for fetching information about the tables in a given database. In MySQL, any parameters given are ignored, the values from the database handle are used instead, and a list of tables and views for the database is returned. Here is an example:
...
my $dbinfo = $dbh->table_info();
while( my($qualifier,$owner,$name,$type,$remarks) =
$dbinfo->fetchrow_array()) {
foreach ($qualifier,$owner,$name,$type,$remarks) {
$_ = '' unless defined $_;
}
print "$qualifier $owner $name $type $remarks \n";
}