Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
#!/usr/bin/perl #Loads the CGI Module use CGI; use HTML::Template; # creates a new CGI object my $page = new CGI; $Create a new HTML:Template object my $Temp = new HTML::Template; # This will print a standard HTML header print $page->header; # Grab a named CGI parameter my $value = $page->param("video"); #Open up the file that contains the review of the video open(SEE, "../$value") or die "The File could not be opened."; ###The Shtick for the name in the Title Bar #Split it up into individual words and #put it into an array my @tokens = split(/[\/_\.]/, $value); #splice the first three elements from the array splice(@tokens, 0, 3); #Pop the end of the list off pop(@tokens); #Then put the remaining things together $Title = join(' ', @tokens); #Save the file to an array @video_info = <SEE>; #Now print out lots of HyperText Mark-up Language using # HTML::Template my $template = $Temp->new(filename => '../Template/my.tmpl'); $template->param(text => "@video_info"); $template->param(Title => "$Title"); print $template->output; exit;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: More with HTML:Template
by wog (Curate) on Nov 23, 2001 at 08:36 UTC | |
|
Re: More with HTML:Template
by mce (Curate) on Nov 23, 2001 at 14:12 UTC | |
by wog (Curate) on Nov 23, 2001 at 21:10 UTC | |
|
Re: More with HTML:Template
by Dogma (Pilgrim) on Nov 23, 2001 at 15:22 UTC |