Install Active State Perl per the instructions that come with your version. That normally installs Perl to the directory c:\Perl. The executables are in c:\Perl\bin. The installer does a good job of setting up Perl. The following concentrate on the things needed for PWS to work with Perl.
PWS needs to be able to find the perl executable so it can run
your perl programs. PWS looks in the registry entry:
HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\W3SVC\Parameters\Script
Map
for the location of the perl executable.
Here are the registry entries that you need:
All extensions with the same data value are equivalent.
Here is a registry script to make these entries. Copy the following lines (beginning with REGEDIT4) to a text file and name it perlparm.reg. Import the file with regedit.exe. ALWAYS BACKUP THE REGISTRY BEFORE YOU MAKE ANY CHANGES!
REGEDIT4 [HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\W3SVC\Parameters\Script Map] ".pl"="c:\\perl\\bin\\perlis.dll" ".cgi"="c:\\perl\\bin\\perlis.dll" ".plx"="c:\\perl\\bin\\perlis.dll"
ALWAYS restart after editing the registry! Note that entries are only required for the file extensions you intend to use for your perl programs.
PWS needs a virtual directory set up with the proper permissions for your perl programs. This is done in Personal Web Manager (the "Publish" icon on your desktop).
The following is for PWS with the home directory set to d:\inetpub\wwwroot as shown above. If your PWS home directory is different, you will need to make the obvious changes to the following instructions.
Clickt the "Advanced" button.
You should have a "/cgi-bin" virtual directory directly under the "<Home>" directory. If so, check it's pproperties with the "Edit Properties ..." button. If you don't have this directory, add it with the "Add" button.
The next screen shows the properties you need:
That should be everything that is needed. You should now be able to put a CGI program into the cgi-bin directory and run it by browsing to http://localhost/cgi-bin/<program>.pl. Here are links to two test files that you can use to test your implementation. CAUTION: Don't try to run them from here or copy them from the screen. Right click on the links and save them to your "?:\inetpub\wwwroot\cgi-bin" directory as either .pl or .cgi files.
test.txt Save this file as test.pl (or test.cgi) in your cgi-bin directory.
ev.txt Save this file as ev.pl (or ev.cgi) in your cgi-bin directory.
Test.pl will display "Hello World" in Header2 type centered between two horizontal rules. If it does you have correctly set up Perl for PWS.
Ev.pl will display a nicely formatted list of your environment variables.
Copyright © by J. E. Rickenbacker. All rights reserved.
4-24-02