in reply to About HTML::Template

First, drop everything and go read jeffa's tutorial on HTML::Template. But the HTML should look something like this (untested model code):

<HTML> <HEAD> <TITLE> <TMPL_VAR NAME=Title> </title> </head> <BODY> Here's the text from the .txt file<br> <TMPL_LOOP NAME=Text> <TMPL_VAR NAME=Line><br> </TMPL_LOOP> </body> </html>
But that's a LOT of work. If all you want to do is print a text file to a screen, then just crank up CGI.pm, and print the contents (untested model code):
use strict; use CGI qw(:standard); print header; print start_html('My Text File'); open (TEXTFILE, "my_text_file") or die "Cannot open text file: $!"; while (<TEXTFILE>) { chomp; print $_, p; } close (TEXTFILE) or die "Cannot close file: $!"; print end_html;
No need to use HTML::Template to do all that work.

----Asim, known to some as Woodrow.