# main_template aus DB lesen my $statement = "SELECT template FROM template WHERE name='main_template'"; my $sth = $dbh->prepare($statement)          || die $dbh->errstr; unless( my $rv = $sth->execute ){ die "Konnte main_template nicht aus Datenbank lesen"; } my $template = HTML::Template->new(arrayref => $sth->fetchrow_arrayref() ); $sth->finish(); # self füttern $template->param(SELF => $cgi->url(-relative=>1) . '?sid=' . $query->{sid}); # Ausgabe print $template->output;