Perl/Installing on Win32 Systems

IntroductionEdit

Most reference literature on perl discusses working with perl in unix-like environments. However, perl is readily available for installation and use on Win32 systems (that is, on systems running a Microsoft Windows OS system). There are two perl projects for Win32 systems that allow implementation of perl in Win32. The first, and perhaps most popular, is the ActiveState distribution of perl. ActiveState is a software company that has developed a proprietary release of perl which is available for free download and comes with readily available support systems. There is an alternative to the ActiveState software however. Strawberry Perl is a fully open source distribution of perl for Win32 systems. While Strawberry Perl is not as matured as ActiveState, it is well maintained and readily available for free download. Strawberry Perl offers a development methodology of perl that more closely resembles perl in its native development environment of unix-like systems. If one is studying perl from a book that discusses perl development primarily in a unix-like environment, Strawberry Perl may provide the most attractive Win32 distribution (its CPAN access system is particularly useful in this realm).

For further information regarding ActiveState Perl click here.
For further information regarding Strawberry Perl click here.

ActiveState PerlEdit

ActivePerl [1] from ActiveState is the definitive Perl interpreter for Win32 systems. There are two versions that can be obtained. One comes with an extensive IDE and some extras, but the stripped down *nix version is free.


Installation is fairly straight forward. Download the installer. Double-click and choose the location for your installation. Difficulty is minimal.

  Click Next

  Accept the terms of the User Agreement

  Choose the components you wish to install. Here you can decide to skip the examples or documentation if you wish.

  Here yous should allow Perl to be added to the PATH variable. This will make it much easier to access the Perl interpreter from random places in the file system. The other options on this page deal with your preferences on file associations.

  Now let the installer do your bidding and be done!

To verify that Perl is installed properly go to Start->Run->type "cmd"->at the command prompt type "Perl -v" and press enter.

You should see something like:


This is perl, v5.8.0 built for MSWin32-x86-multi-thread
(with 1 registered patch, see perl -V for more detail)

Copyright 1987-2002, Larry Wall

Binary build 804 provided by ActiveState Corp. http://www.ActiveState.com
Built 23:15:13 Dec  1 2002

Strawberry PerlEdit

Strawberry Perl can be downloaded from its homepage here. First, the user must decide whether he or she wants to use version 5.10.0.4 of perl or version 5.8.8.4 of perl. Each version is compatible and usable on Win32 systems. 5.10.0.4 is simply the most recent release of perl which has some added capability that 5.8.8.4 lacks. However, 5.10.0.4 is being actively developed and worked upon while 5.8.8.4 is a static, finalized release. This is the primary reason both are offered. Once a choice is made, click on the the respective link in the pink boxes. This will download an executable to your downloads directory on your machine.

Once the appropriate executable is downloaded, open the executable and run it. This should take you to the Strawberry Perl Setup Wizard:

 

Click the 'Next' button to start configuring your installation options. First, you will be prompted for a Start Menu location via the following dialogue:


 

Changing the text in the location bar will change the name of the start menu directory you create. Alternatively, you can check the checkbox at the lower left hand of the dialogue screen to keep the installation from creating a start menu item for Strawberry Perl. Clicking 'Next' will take you you an installation confirmation screen that resembles the one below:

 

Once the 'Install' button is clicked, Strawberry Perl will download onto your machine in the directory: C:\strawberry where C:\ represents your local hard drive directory. Once the installation is complete, perl can be run from the command line in the same manner that it is run in unix-like environments. To verify that the perl interpreter will be can be accessed from any directory, you should check your PATH variable in your environment variable settings to make sure that the C:\strawberry directory is added to it. To do this in Windows XP, access your system settings via Control Panel --> System. Once there, access the "Advanced" tab. On the Advanced tab, click the "Environment Variables" button at the bottom of the dialogue box. This will pop up a new dialogue box titled "Environment variables". Locate the "System Variables" section of this new box, it will contain a list of names with a scrollbar at the side. Scroll down until you see the 'Path' variable. Select this variable and click edit. This pops up a third dialogue box with two text bars in it, one titled "Variable name:" and one titled "Variable value." Scroll to the rightmost end of the "Variable value" bar. at the end, with no spaces between semicolons, add the following text:

;C:\strawberry\c\bin;C:\strawberry\perl\bin;

NOTE: If you use a different local hard drive designation other than C:\ you should substitute that designation where C:\ exists above.

Clicking 'Ok' to back out of all three dialogue boxes will add the strawberry perl directories to your default search realm for running programs. Thus, you can type 'perl sctriptname.pl' at your command line from any directory and windows will know to access the file via the perl interpreter. If your location for installing Strawberry Perl was different than the one listed above for some reason, you should add your appropriate directory path to the path variable rather than that in the preformatted box above.

Finally, for any questions or concerns relating to Strawberry Perl you can go here

Note: Strawberry Perl is an open source distribution of Perl originally founded by Adam Kennedy. All software and credit should be attributed to him and the Strawberry Perl team for doing such a great job on developing an open source distribution for windows.

External Strawberry SourcesEdit

Copyright 1987-2002, Larry Wall

LicensingEdit

Perl may be copied only under the terms of either the Artistic License or the GNU General Public License, which may be found in the Perl 5 source kit.

Complete documentation for Perl, including FAQ lists, should be found on this system using 'man perl' or `perldoc perl'. If you have access to the Internet, point your browser at http://www.perl.org/, the Perl Home Page.