Windows platforms are the only group that do not have Perl already preinstalled, so you have to manually install Perl onto your Windows machines. Of the many Perl distributions for Windows, ActiveState's ActivePerl is the most widely used one, so Vect is linked against this installation. It can be downloaded from their website. You need to be in the Administrator account to configure and install Perl.
You will be asked for the registration information. In the new page, out of the list of all available download files, select the latest 5.8.x build and the MSI format for windows. Click on that file to download. Once the file is downloaded, double click on it to start the ActivePerl installation process. Go on to select the default options and Perl will be installed into the directory C:\Perl\. If you get any Virus alerts, ignore them and let all the installation script run through. This can take up to ten minutes on a slow machine.
Additional setup notes:
If the ActivePerl installation is correct, the path variable should have included the Perl location, so that Perl can be run from any directory location. Also, the .pl extension should have been associated with Perl, so that by double-clicking on on any Perl program with the .pl extension we can automatically run Perl with that file. If this is not the case, you can re-run the ActivePerl installation script or follow the following manual steps to configure these two properties:
-
Setting the 'Path' variable to include the path of the Perl executable file perl.exe. To do this, follow the steps below. As mentioned before, you need to have administrator privileges to do this.
* Open 'Control Panel' by going through 'Start' menu and 'settings' menu
* Open the 'System' folder in Control panel
* Go to the 'Advanced' tab in the 'System Properties' dialog box
* Click on the 'Environment Variable' button
* In the 'System Variables' list, see if 'Path' is already defined. If it is already there, press the 'edit' button, otherwise press 'new' button.
* If it is a new variable use 'Path' for variable name field and 'C:\Perl\bin\' for variable value. If the variable is already there, then append the following text to the current value ';C:\Perl\bin' . (Use the right directory name in case you installed Perl in a directory other than C:\Perl\). Click 'OK' until you get completely out of the 'System Properties' dialog box.
Open a new command window to see the changes. Command window can be opened by typing 'cmd' in 'Run' in the Start Menu. To make sure that this step is done correctly, download the sample helloworld file to C:\ directory, type 'perl helloworld.pl' in the same directory and see if it runs correctly.
-
Associating .pl extension with the Perl executable file. To do this, follow the steps below.
* Open 'Control Panel' by going through 'Start' menu and 'settings' menu
* Open the 'Folder options' folder
* Click on the 'File types' tab
* Look for 'pl' extension in the list
* If it is not already there, create a new 'pl' file type by pressing 'new' button.
* Press 'Change' button to associate with Perl executable. Select the 'Perl commandline interpreter' if it is already system recognized and is in the list, Otherwise use 'Other' button to select 'C:\Perl\bin\perl.exe'. Press 'OK' and 'Close' to exit the setup windows.
To make sure that this is done correctly, in the command window, just type the sample helloworld perl file name to see if it runs. Do not forget to have '.pl' extension to the file name.
Whether you have done the above setup or not, you can always run a Perl script on the commandline using ' C:\Perl\bin\perl scriptfile'. Here is a sample helloworld perl script.
|