Casey Nguyen wrote:

> #!/usr/bin/perl
> 
> print "Content-type: text/html\r\n\r\n";
> print "<html><head><title>test</title></head><body>";
> print "<p><center>\n";
> print "<h1><b>Hello World</h1>\n<p>";
> print "<h5>This is Perl Script</h5>\n";
> print "</body></html>\n";

Some things to look at:

1. Your line endings are wrong. Under dos-ish systems, every "\n"
results in a CR/LF pair being sent. So your lines are ending with
CR/CR/LF. But the HTTP RFC says that lines end with CR/LF. So add a

        binmode(STDOUT);

as the second line of the script.

2. Omit the <p> after "Hello World".

3. In cases like this, you might like to add a

        use CGI::Debug;

(and, of course, install the CGI::Debug module). It'll tell you
via the browser about what went wrong.

-- 
Ned Konz
currently: Stanwood, WA
email:     [EMAIL PROTECTED]
homepage:  http://bike-nomad.com, Perl homepage:
http://bike-nomad.com/perl

---
You are currently subscribed to perl-win32-users as: [archive@jab.org]
To unsubscribe, forward this message to
         [EMAIL PROTECTED]
For non-automated Mailing List support, send email to  
         [EMAIL PROTECTED]

Reply via email to