Obtaining Perl

Previous Table of Contents Next

Obtaining Perl

It would be remiss of me to tell you so much about Perl without telling you how to get it, although these days it's hard to avoid; you probably already have it, especially if you have any flavor of UNIX or Linux. The easiest way to find out whether you have it is to get a command prompt and type:

perl -v

and see if you get a response. If not, try:

whereis perl

which on a UNIX system or similar will look around for Perl. If that doesn't work for you either, here are brief instructions on how to download and install Perl:

  • For Microsoft Windows machines, get the free ActivePerl distribution: http://www.activeState.com/ActivePerl/download.htm

  • For Macintosh:


    (That URL is for pre-X versions of the OS; Perl comes with Mac OS X and builds fine on it, too.)

  • For binary distributions for all other machines:


  • For the source of perl itself:


The source file you want is called stable.tar.gz. The file devel.tar.gz is for Perl developers or testers only, and the file latest.tar.gz is the same as stable.tar.gz for complex historical reasons. Anything mentioning "Ponie" will be for developers only through 2004 at least, and any perl with a three-number component version with an odd middle number is likewise a development version.

Building Perl from source on a supported UNIX architecture requires just these commands after you download and unpack the right file:



make test

make install

The Configure step asks you zillions of questions, and most people won't have a clue what many of those questions are talking about; but the default answers Configure recommends are usually correct.[2]

[2] If you want to let Configure use those recommendations and go on without asking you, you can give it the options -des and it'll churn away happily without your intervention. If you need more platform-specific help, look in the distribution for the README.platform file corresponding to your system.

www.cpan.org is the master Comprehensive Perl Archive Network (CPAN) site, mirrored around the world. CPAN is also the official repository of contributed modules (see Section 8.1).

    Previous Table of Contents Next
    © 2000- NIV