I think I'm missing something really minor here, but after reading over both the html & the perl several times, I'm not catching anything wrong. Why isn't this page giving the proper output?

<html>
<head><title>Jackson Elementary School</title><basefont size=5></head>
<body>
Click here.<br />
<a href="http://localhost/cgi-bin/chap02/c02ex2.cgi" /><img src="jackson.gif"></a><br /><br />
<a href="http://localhost/cgi-bin/chap02/jackson.cgi?state=Alabama&cap=Montgomery">Alabama</a><br />
<a href="http://localhost/cgi-bin/chap02/jackson.cgi?state=Alaska&cap=Juneau">Alaska</a><br />
<a href="http://localhost/cgi-bin/chap02/jackson.cgi?state=Arizona&cap=Phoenix">Arizona</a><br />
<a href="http://localhost/cgi-bin/chap02/jackson.cgi?state=Arkansas&cap=Little+Rock">Arkansas</a><br />
</body>
</html>

Here's the accompanying CGI script:

#Hands-on Project 2 from page 40
#c02ex2.cgi
print "Content-type: text/html\n\n";

use CGI qw(:standard);

#create web page

print "<html>\n";
print "<head><title>Jackson Elementary School</title></head>\n\n";
print "<body>Jackson Elementary School</body>\n";
print "</html>\n";

I hope it's just that I'm really tired and managed to miss something minor and not that I have the entire thing messed up.

Recommended Answers

All 3 Replies

You did not say what output it is giving, but judging by your other thread it just displays the perl code. That means your http server is not setup correctly to run scripts. You need to find a tutorial for the specific http server you are using and find out how to configure it to run scripts.

Yeah, that is what it's showing. Would I be able to use a box that has XP Pro w/ IIS installed?

As far as I know the answer is yes.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.