It would probably be best to change your open to the complete path to the file that the user wants open.
also, since you seem to be using an editor for your html, why not pull the html out of the perl

Look into HTML::Template. It will make site updates much nicer and break less perl. html::template tutorial.

here are the changes I would make:
cgi file:

#!/usr/bin/perl -wT use strict; my $video_info; # Loads the CGI Module use CGI; # creates a new CGI object my $page = new CGI; # 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, "/var/www/docs/$value") or $video_info="$!"; while(<SEE>){ #put data from review into variable $video_info .= "$_"; } #close file close(SEE); #Now print out lots of HyperText Mark-up Language using # HTML::Template my $template = HTML::Template->new(filename => 'my.tmpl'); $template->param(info => $video_info); print $template->output; exit;

and the template:
<HTML> <HEAD> <META NAME="GENERATOR" CONTENT="Adobe PageMill 3.0 Win"> <TITLE>Animetion Station &gt; Video Review &gt; Oh MY Goddess! Volum +e 1</title> <LINK REL="stylesheet" HREF="../Style.css" TYPE="text/css"> </head> <BODY TEXT="#ffffff"> <P STYLE="background-color: #3257b8; width: 350px;"><I><FONT SIZE="+3" FACE="Garamond">Animetion Station</font></i></p> <div id="Bottom"> <P><I><FONT SIZE="+2" FACE="Garamond">Video Review</font></i></p> </div> <P><CENTER>&nbsp;</center></p> <P><TABLE WIDTH="738" BORDER="0" CELLSPACING="0" CELLPADDING="0" HEIGHT="24"> <TR> <TD WIDTH="67" VALIGN="TOP"> <div class="Standard"> <P><CENTER><A HREF="../index.htm">[Home]</a> <HR> <A HREF="../Gallery.shtml">[Gallery]</a> <HR> <A HREF="../Manga.shtml">[Manga]</a> <HR> <A HREF="../Video_Review.shtml">[Video Reviews]</a> <HR> <A HREF="../Links.shtml">[Links]</a> <HR> <A HREF="../Web_Comic.shtml">[Web Comic]</a></center></td> <TD VALIGN="TOP" WIDTH="270" HEIGHT="131"> </div> </td> <TD WIDTH="382" VALIGN="TOP"> <!-- this is the bit that HTML::Template wants so it knows where to pu +t the value of $video_info --> <TMPL_VAR NAME="info"> <!--VIDEO REVIEW LINKS--> <P STYLE="background-color: darkBlue;"> <A HREF="cgi-bin/Video_Gen.cgi?video=Video_Txt_Files%2fBattle_Skip +per_Vol_1.txt">Battle Skipper Volume One by Ertain</a><BR> <A HREF="cgi-bin/Video_Gen.cgi?video=Video_Txt_Files%2fOMG_Vol_1.t +xt">Oh My Goddess! Volume One by Ertain</a><BR> <A HREF="cgi-bin/Video_Gen.cgi?video=Video_Txt_Files%2fOMG_Vol_2.t +xt">Oh My Goddess! Volume Two by Ertain</a><BR> <A HREF="cgi-bin/Video_Gen.cgi?video=Video_Txt_Files%2fOMG_Vol_3.t +xt">Oh My Goddess! Volune Three by Ertain</a><BR> <A HREF="cgi-bin/Video_Gen.cgi?video=Video_Txt_Files%2fOMG_Vol_4.t +xt">Oh My Goddess! Volume Four by Ertain</a><BR> <A HREF="cgi-bin/Video_Gen.cgi?video=Video_Txt_Files%2fOMG_Vol_5.t +xt">Oh My Goddess! Volume Five by Ertain</a></p> </td> </tr> </table> </body> </html>

-p

In reply to Re: Display Troubles by thatguy
in thread Display Troubles by Anonymous Monk

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.