Standard Perl distribution

The standard Perl distribution is available from CPAN, where you’ll find binary and source distributions for the current version of Perl. The source distributions come as .tar.gz files, which you can extract using a utility that supports gzip files, tar files, and long filenames. Ports of both GNU gzip and tar are available for the various Win32 platforms, or you can use a graphical zip archive program such as WinZip. Make sure you preserve the directory structure when you unpack the distribution.

To install from the source, you need the Microsoft Visual C++ compiler, the Borland C++ compiler, or Mingw32 with EGCS gcc-2.95.X. If you’re using Cygwin32, do not try to build Perl in the win32 subdirectory. Instead, you should run Configure in the src directory as you would when building under a Unix platform. You also need a make utility. Microsoft Visual C++ comes with nmake, or you can use dmake.[2]

Once you have the distribution, start by reading the file README.win32. Next, edit the file Makefile in the win32 subdirectory of the distribution and make sure that you’re happy with the values for the install drive and directory. Then execute the following commands from the win32 subdirectory of the distribution to build, test, and install the distribution. This example assumes that you have the proper environment variables (LIB, INCLUDE, etc.) set up for your compiler and that nmake is your make program.

C:\> nmake         Build all of Perl
C:\> nmake test    Test ...

Get Perl in a Nutshell, 2nd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.