How do I ignore the Perl shebang on Windows with Apache 2?
Posted
by nbolton
on Stack Overflow
See other posts from Stack Overflow
or by nbolton
Published on 2010-01-10T09:16:48Z
Indexed on
2010/05/07
22:08 UTC
Read the original article
Hit count: 368
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.
© Stack Overflow or respective owner