[San-Diego-pm] Shebang path issue

Brian Manning elspicyjack at gmail.com
Fri Nov 22 11:42:22 PST 2013

On Fri, Nov 22, 2013 at 11:20 AM, Joel Fentin <joel at fentin.com> wrote:
> However, if I am running the Apache server, and I type:
> The she shebang must be:
> #!/perl/bin/perl
> #!/usr/bin/perl will not work.
> Is there a reasonable workaround?

You can try this for your bangpath at the top of your script:


If it doesn't work, then no, there is no simple workaround, you will
have to manually switch the bangpaths (aka shebang paths) every time
you upload the Perl script from your Windows dev machine to your Unix
web host.  Apache uses the bangpath at the top of CGI scripts to
determine what binary it should use to execute that script.

Last night we also discussed doing development in a virtual machine
that runs Linux. If you used a Linux VM, you would not have to change
the bangpath every time you uploaded the script to your Unix webhost.
VirtualBox is free, and is located at https://www.virtualbox.org/.



More information about the San-Diego-pm mailing list