manish.rathi has asked for the wisdom of the Perl Monks concerning the following question:

Unix/linux environment looks at the shebang line to determine which interpreter to look for. I am working on windows and in windows, file extension suggests what interpreter to use. How will .CGI extension invoke perl interpreter ? If different executable cgi files are created using different languages eg java, php and perl, and all files reside in the same directory. In case of java file, it can be recognized with .class extension and jre will be used when this java file is invoked. But in perl and php , if both files have .cgi extension, how does the server understand which interpreter to use if both files have .cgi extension ? Thanks.

Replies are listed 'Best First'.
Re: perl CGI on windows
by ikegami (Patriarch) on Mar 03, 2009 at 18:22 UTC
    You'll need to consult the documentation for your server. You didn't specify which one you use.
Re: perl CGI on windows
by MidLifeXis (Monsignor) on Mar 03, 2009 at 18:26 UTC
Re: perl CGI on windows
by ELISHEVA (Prior) on Mar 03, 2009 at 18:46 UTC

    Didn't you just ask a very similar question a few days ago: perl CGI? A lot of answers were given there. What exactly are you still confused by?

    Best, beth

      This question is in follow up with the question I asked few days ago. When I put this question in the last post, nobody looked at it. I guess helpmates believed that post was done with. So I put the this question in a new post.

      My confusion is regarding CGI script in windows environment. If two different CGI scripts are written in two different scripting languages and they are residing in the same directory (Both have different names but same .cgi extension), how will the server know which interpreter to use to execute these cgi scropts ? As in windows environment shebang line is not important and extensions are read to decide file type.

Re: perl CGI on windows
by glasswalk3r (Friar) on Mar 03, 2009 at 18:26 UTC

    Are you using ActivePerl?

    If you are, check out the documentation with it in ActivePerl FAQ, Windows Specific FAQ, Web Server Configuration (ActivePerl-faq6)

    Alceu Rodrigues de Freitas Junior
    ---------------------------------
    "You have enemies? Good. That means you've stood up for something, sometime in your life." - Sir Winston Churchill
Re: perl CGI on windows
by jethro (Monsignor) on Mar 03, 2009 at 18:27 UTC
    Do I misunderstand something or wouldn't the two files then have completely identical names? In that case they can't be stored in the same dir. And if they don't, their filename or directory differentiates between them.