in reply to Re: How do I install perl on win2000 so that I can use perl file offline?
in thread How do I install perl on win2000 so that I can use perl file offline?

but whenever I access a .pl file using Internet Explorer It brings up a download thing. Or a perl dos window appears and then goes away. Not html output or anything. I did the right content type statement but no success.
  • Comment on Re: How do I install perl on win2000 so that I can use perl file offline?

Replies are listed 'Best First'.
Re: I've done that
by Corion (Patriarch) on Feb 12, 2001 at 01:59 UTC

    Your webserver returns the wrong content-type header or your Perl scripts don't return content-type:text/html headers, most likely because you are not using the CGI.pm module.

    That a DOS window (in fact, it's just a console window, but the term DOS window is more common) opens, is natural, as Windows starts Perl.exe to open/execute the file that was downloaded as .pl file, and Perl is connected to the .pl file extension. So check that your MIME types in your webserver are correct and that your scripts are also generating the right content-type headers.

    And use CGI !

Re: Re: How do I install perl on win2000 so that I can use perl file offline?
by rrwo (Friar) on Feb 12, 2001 at 04:09 UTC

    Silly question: are you accessing Perl scripts through a webserver (that is, <samp>http://localhost/myscript.pl</samp>) or are you accessing them through Windows Explorer (<samp>C:\InetPub\wwwroot\myscript.pl</samp>)? It sounds like the latter.

    It makes a world of difference. Windows explorer runs the Perl scripts as if they were run from a command shell. Your webserver runs them with the appropriate environment values set and querie parameters sent, filters the output, and sends it to the web browser.