Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 553255
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T11:35:09+00:00 2026-05-13T11:35:09+00:00

I have set up a local Perl web environment on my Windows machine. The

  • 0

I have set up a local Perl web environment on my Windows machine. The application I’m working on is originally from a Linux server, and so the shebang for source .pl files look like so:

#!/usr/bin/perl

This causes the following error on my Windows dev machine:

(OS 2)The system cannot find the file specified.

Is it possible to change my Apache 2 conf so that the shebang is ignored on my Windows machine? Of course I could set the shebang to #!c:\perl\bin\perl.exe, that much is obvious; but the problem comes to deploying the updated files. Clearly it would be very inconvenient to change this back on each deploy. I am using ActivePerl on Windows 7.

Update:

I should have mentioned that I need to keep the shebang so that the scripts will work on our shared hosting Linux production server. If I did not have this constraint and I didn’t have to use the shebang, the obvious answer would be to just not use it.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T11:35:09+00:00Added an answer on May 13, 2026 at 11:35 am

    I use #!/usr/bin/perl in my scripts and configure Apache on Windows to ignore the shebang line. Add

     ScriptInterpreterSource Registry-Strict
    

    to your httpd.conf and set up the Windows Registry key as explained in the Apache docs.

    Here is what I get when I export the key:

    Windows Registry Editor Version 5.00
    
    [HKEY_CLASSES_ROOT\.pl\Shell\ExecCGI\Command]
    @="c:\\opt\\perl\\bin\\perl.exe"
    

    I have been using this setup with Apache and ActiveState Perl on my Windows laptop and the Apache and Perl distributions that come with ArchLinux on my server.

    The Apache docs (to which I linked above) state:

    The option Registry-Strict which is new in Apache 2.0 does the same thing as Registry but uses only the subkey Shell\ExecCGI\Command. The ExecCGI key is not a common one. It must be configured manually in the windows registry and hence prevents accidental program calls on your system. (emphasis mine)

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have inherited a web project that is perl based and I'm attempting to
I set up a fossil repository on a shared hosting account I have. I
It seems that most of the installers for Perl are centered around installing Perl
I'm following a bioinformatics text, and this represents one of my first Perl scripts.
Here is my situation: I know almost nothing about Perl, but it is the
Situation: I have a module Foo::Quux::Bar , living in ./Bar.pm . I need to
I realize there's the W3C validator, which works great for one page. There's also
I'm continuing to work out of an outdated bioinformatics book and I'm attempting to
I'm trying to build an RPM that will install file dependencies if they don't

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.