Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Perl Installation

Status
Not open for further replies.

dalhousi

Programmer
Mar 26, 2007
21
CA
Hi Everyone,

I'm new to Perl. I've been trying to run Perl and Apache under Windows.

I downloaded and installed Perl from activestate.com. I linked it with Apache; and I wrote the first line in my Perl Script: #!C:\perl\bin\perl.exe

However, it is not working. Everytime I request the Perl page, it gives me the error: "Internal Server Error". I checked Apache error logs file and I found the line:
"malformed header from script. Bad header=<H1>Hello World</H1>"

Any suggestions?

Thanks in advance,
Cheers,
 
Perl scripts need to print a complete http header before printing aything else to the browser:


Code:
#!C:\perl\bin\perl.exe
[b]print "Content-type: text/html\n\n";[/b]
print "Hello World!";

------------------------------------------
- Kevin, perl coder unexceptional! [wiggle]
 
Thank you Kevin. That was the problem. It is working now. [thumbsup2]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top