in reply to How does apache under NT find the perl interpreter?

Actually, Apache under NT4 will allow you to use a shebang in the form of:

#!Perl/bin/perl

In other words, you don't need the drive letter if Apache and Perl are on the same drive and NT understands back and forward slashes in paths.

It also helps if you install Perl in a directory called "usr" instead of the default "Perl" so that you don't need to edit the shebang when you upload the script to a UNIX server. ;)

I wish someone had told me that before I installed it. :/

Oh, and the registry option does work, which is handy for running scripts on the command line.

Replies are listed 'Best First'.
Re: Answer: How does apache under NT find the perl interpreter?
by osama (Scribe) on Jan 11, 2003 at 20:29 UTC
    Apache under windows uses the #! line, if a drive letter is ommited it assumes the same drive that apache is installed in, otherwise you need to specify it as in #!d:/perl/bin/perl When I used to install perl/apache on windows I would:
    1. install apache in the default dir "C:\Program Files\Apache" folder.
    2. run apache's command to register service, set start mode for the service to automatic.
    3. install perl in c:\usr
    That way apache runs on every boot, and when you type #!/usr/bin/perl, in a script it just works!