I've been trying my hardest to get this CGI to work. I am trying to make a webpage from the information that is submitted via a form or web link, such as using www.cheese.com/foo?node=Gouda and it is then sent to the CGI file where it is decoded and marked up in the appropriate way. Here is what I have so far.
#!usr/bin/perl if ($ENV{'REQUEST_METHOD'} eq 'GET') { #Check to see which one it is $Good_Stuff = $ENV{'QUERY_STRING'}; #Split up the information } elsif ($ENV{'REQUEST_METHOD'} eq 'POST') { read(STDIN, $Good_Stuff, $ENV{'CONTENT_LENGTH'}); } ($Name, $Image) = split(/=/, $Good_Stuff); #Split up more stuff @Stuff = split(/%2F/, $Image); #This will split up the file into to pa +rts $Final = join('/', @Stuff); #Join it together for something that is wh +ole #Print out lots of stuff (this never works, though). print "Content-type: text/html\n\n"; print "<HTML><HEAD>\n"; print <<ENDMETA; <META NAME="GENERATOR" CONTENT="Adobe PageMill 3.0 Win"> <TITLE>Animetion Station &gt; Webcomic &gt; $Name</title> <LINK REL="stylesheet" HREF="Style.css" TYPE="text/css"> ENDMETA print "</head><BODY>\n"; print <<ENDHTML; <P><CENTER><DIV STYLE="background-color: #0099FF; font-family: Comic S +ans MS; font-size: 20px; width: 200px; color: white;">Web Comics</div></center></p> <P><TABLE WIDTH="757" BORDER="0" CELLSPACING="1" CELLPADDING="0" HEIGHT="294"> <TR> <TD WIDTH="14%" VALIGN="TOP" ALIGN="CENTER" HEIGHT="293"> <!--#include file="Sidebar.txt"--> </td> <TD WIDTH="86%" VALIGN="TOP" BGCOLOR="#3366ff"> <P><IMG SRC="$Final"></p> <P><IMG SRC="Images/Comic_Face.jpg" WIDTH="57" HEIGHT="54" ALIGN="BOTTOM" BORDER="0" NATURALSIZEFLAG="3"> <IMG SRC="Images/Co +mic_Face2.jpg" WIDTH="60" HEIGHT="55" ALIGN="BOTTOM" BORDER="0" NATURALSIZEFLAG=" +3"> <IMG SRC="Images/Comic_Face3.jpg" WIDTH="60" HEIGHT="62" ALIGN="BOTTOM" BORDER="0" NATURALSIZEFLAG="3"> <IMG SRC="Images/Co +mic_Face4.jpg" WIDTH="60" HEIGHT="60" ALIGN="BOTTOM" BORDER="0" NATURALSIZEFLAG=" +3"></td> </tr> </table> ENDHTML print "</body></html>\n";
I would like a user to input the data from a form or web link and get the image or information is needed. I made this so that a person doesn't have to click through too many webpages and it saves on writing code. Could you help me?

In reply to Making webpages from a single CGI 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.