Perl Programming   «Prev  Next»
Lesson 3Obtaining Perl from the Web.
ObjectiveDownload perl for your system.

Obtaining Perl from the Web

To complete the exercises in this course, you will need a copy of perl for your system.

Perl already installed

If you already have perl installed and running on your machine. Go to the lesson in this module entitled Hello, World! in which you will run a simple Perl script. To find out if you already have perl, try typing

perl -v

into a command-line prompt on your system.

Open DOS prompt

If you are running Windows, you willl need to open a DOS prompt.
To do this, click the
  1. Start
  2. Menu >>
  3. Programs >>
  4. MS-DOS Prompt.

If you have perl, the response you get will look something like this:

This is perl, version 5.003 
with EMBED built under solaris
at Dec 23 1996 15:19:42
+ suidperl security patch

Copyright 1987-1996, Larry Wall

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.0 source kit. 

Running MacPerl

If you are using a Mac, search for the MacPerl application anywhere on your system.
If you have MacPerl on your machine, you can find the version number by single-clicking on the application and selecting Get Info from the File menu.

If the version number that you see on your screen is less than 5.003, you will need to upgrade your perlbefore proceeding. If you get a message that says "unrecognized command" or something similar, then you either do not have perlor it is not installed correctly. If you do have perl, and the version number is 5.003 or greater, then you can skip the next lesson.

Download perl

If you do not have perlor need to get a new copy, here is the download information.

Downloading Perl from Web

All of the perl downloads available from this page are freeware.

Perl Unix

If you will be running perl on a Unix/POSIX system (or Unix-like system, such as NeXT, Plan 9, AIX, and so on) you can download the source code for perl from Perl.com

Setting up Perl Environment

There are a few ways to set up a Perl development environment on Windows, but one of the most popular and easiest ways is to use the Strawberry Perl distribution. Strawberry Perl is a distribution of Perl that includes a large number of modules and extensions that are commonly used in Perl development.
Here are the steps to set up a Perl development environment on Windows using Strawberry Perl:
  1. Download the latest version of Strawberry Perl from the official website (http://strawberryperl.com/).
  2. Run the installer and follow the prompts to install Strawberry Perl on your system.
  3. Once the installation is complete, open the command prompt and type "perl -v" to confirm that Perl has been installed and to check the version of Perl that is currently in use.
  4. To install additional modules and extensions, you can use the cpan (comprehensive Perl archive network) command-line tool. For example, to install the DBI module, you would type "cpan DBI" at the command prompt.
  5. To use a Perl development environment like Eclipse, you can use the Padre editor. It is a Perl IDE written in Perl and runs on Windows, Linux, and Mac OS.
  6. If you want to run your Perl script in a web-based environment, you can use a web framework like Catalyst or Dancer.
  7. Finally, you can also use perlbrew to manage multiple versions of Perl on the same machine.
By following these steps, you should have a functional Perl development environment on your Windows machine that you can use to write and run Perl scripts.


Perl Win32

If you will be running perl on a Windows Operating System, you will need to download the latest version from ActiveState.
Follow the links on this site to the Win32 download.

Perl Mac OS

If you are using a Macintosh, you can use Matthias Neeracher's MacPerl port for the Macintosh.