use DBI; use HTML::Template; my $dbh = DBI->connect( "DBI:SQLite:sqlite_db" ); my $sth = $dbh->prepare( "SELECT name FROM sqlite_master ORDER BY name" ); $sth->execute(); my @tbls; while ( ( my $row ) = $sth->fetchrow_array ) { push @tbls, $row; } $dbh->disconnect; # table.html my $html = qq{
# nächste Seite aufrufen

}; my $tmpl = HTML::Template->new( scalarref => \$html ); my @tables; for my $t ( @tbls ) { push @tables, { TABLE => $t } } $tmpl->param( TABLES => \@tables ); open my $fh, '>', 'tables.html' or die $!; $tmpl->output( print_to => $fh ); close $fh;