cgi programming in Perl



Hi,

I'm working from 'CGI Programming with Perl' from O'Reilly. I've
copied this program from the book.

#!/usr/bin/perl
print <<END_OF_HTML;
Content-type: text/html

<HTML>
<HEAD>
<TITLE> about this server </TITLE>
</HEAD>
<BODY>
<H1> About this Server </H1>
<PRE>
Listening on Port: $ENV(SERVER_PORT)
</PRE>
<HR>
</BODY>
,/HTML>
END_OF_HTML

into a file called server.cgi. Perl is on my machine. If I click on
it using Explorer then zilch. Its supposed to show up as an HTML file
with the server port displayed. Instead it simply does not appear at
all.

The first line looks like a piece of Unix - telling the machine to
execute the file using Perl in bin. I don't have Unix but XP. I do
have a directory C:/Perl/bin with a host of executables in it. Any
ideas on how to get this to go?

Mark

.



Relevant Pages

  • Re: cgi programming in Perl
    ... I'm working from 'CGI Programming with Perl' from O'Reilly. ... Listening on Port: $ENV ... There are several others out there, but Apache ...
    (perl.beginners)
  • Re: cgi programming in Perl
    ... I'm working from 'CGI Programming with Perl' from O'Reilly. ... Listening on Port: $ENV ... There are several others out there, but Apache ...
    (perl.beginners)
  • Re: Wait for background processes to complete
    ... To be able to execute commands in the background and wait for their ... The documentation I am referring to is http://perldoc.perl.org/. ... You can run a command in the background with: ... There is a general problem with perl documentation: ...
    (comp.lang.perl.misc)
  • Re: New Application Extension reports 404
    ... You actually want .RUN to be handled by Perl, ... please add a Web Service Extension ... /command1.run will execute Perl script1.pl ... but IIS4 had the "RUN" extension mapped to execute a predefined perl script. ...
    (microsoft.public.inetserver.iis)
  • Re: Confused by mysqli
    ... it combines prepare and execute. ... It was the whole response object thing that was leaving me ... and the basic interface between Perl and MySQL doesn't do it. ... or other thing that returns rows, your statement handle's fetch* ...
    (comp.lang.php)