use strict; use warnings; use DBI; use CGI::Pretty qw(:standard); my $dbh = DBI->connect( ... ); my @table = @{ $dbh->selectcol_arrayref('show tables') }; for my $table (@table) { my $sth = $dbh->prepare("select * from $table limit 1"); $sth->execute(); print "$table:", br(); print ol(li $sth->{NAME} ); }