I am taking a class on Perl and trying to get it working on Windows Server 2003 running IIS6. I am using Visual Interdev as a development environment. I installed the latest version from ActivePerl. The installation, I believe, went well. Never any issues encountered. So, I created a small test.asp file with the following code:
<HTML> <HEAD> <META NAME="GENERATOR" Content="Microsoft Visual Studio 6.0"> <TITLE></TITLE> </HEAD> <BODY> <form ACTION="scripts/showme.pl" method="Post" id=form1 name=form1> <input type="submit" value="Button" id="button1" name="button1"> </form> </BODY> </HTML>
Then, I created a folder in my project called Scripts. I created a .pl file with the following code and placed it in the Scripts folder.
#!C:\Perl\bin\perl.exe -wT use strict; use CGI ':standard'; print "Content-type: text/html\n\n"; print "Show me the money";
When I first ran the test.asp file and clicked the submit button, I was presented with the following error:   The specified CGI application misbehaved by not returning a complete set of HTTP headers. I found something on the internet that suggested that I change the mappings in IIS to use perlis.dll instead of perl.exe, so I did that. If I now run the test.asp, click the button, the resulting output in the browser is:
Content-type: text/html 'c:\inetpub\wwwroot\weblanguages\scripts\showm +e.pl' script produced no output
I found something else that suggested that I did not need the first line when using Windows. So I actually removed the first three lines from the .pl file, and when I run it without those three lines, the output is:
Content-type: text/html Show me the money
So here is where I stand. I can not figure out how to get the application to stop printing the "Content-type: text/html" part of the output. I am under the impression this is the line used to interpret what is to be displayed and that the browser should not print this line out. Does anyone here have any suggestions on where I can go to find a solution to this, or does anyone here already know the solution? I would be very thankful for any help

2006-01-06 Retitled by jdporter, as per Monastery guidelines


In reply to Need help with Perl in IIS setup by jmboniface

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.