Getting Perl
April 26, 1999
UNIX
Of course, before you can write Perl programs, you'll
need Perl itself. You may already have access to Perl
depending on the type of system on which you develop.
If you develop on a Unix system, such as Solaris, SunOS,
Linux, any BSD variant, or the many others, the chances
are good that Perl is already installed. You can test this
hypothesis quite simply -- login to your shell account (usually
by telnet) and type:
perl -v
The output will look something like:
This is perl, version 5.004_04 built for i386-linux
(with 1 registered patch, see perl -V for more detail)
Copyright 1987-1998, Larry Wall
As you can see, this sample machine has Perl 5.004-04
installed. You do want to be sure that your UNIX system
has at least a Perl version of 5.x; the previous version
of Perl, 4.x, may still be installed on many systems. You
don't want to use Perl 4 because it is old and unfashionable.
A number of UNIX systems have both Perl 4 and Perl 5 installed.
You may find that "perl" leads to Perl 4 but the
command "perl5" leads to Perl 5. Thus, if "perl
-v" failed you with a 4.x version, you might try:
perl5 -v
And see if that reports a 5.x version of Perl. If yes,
then you should remember that your system refers to Perl 5
as "perl5" rather than simply "perl"
-- this will be necessary to know later on.
If, for some odd reason, your UNIX system does not already
have Perl installed, you will have to acquire Perl and have
it installed. The installation would be done by the system
administrator, if that is not yourself. If that is yourself,
you can sometimes obtain ready-made binaries for various
UNIX systems from your vendor (for instance, users of
RedHat Linux
can install the Perl RPM available on either the RedHat CD or Web
site). The brave and courageous can also compile Perl from
the source code, available from the
Perl.com web site.
WINDOWS
Perl happily runs on other systems besides UNIX! If you
develop in Windows, or would like to develop Perl programs
in both Windows and UNIX environments, you can easily
install the latest version of Perl. ActiveState maintains a
Windows version of Perl which is quite easy to install, named
ActivePerl.
MACOS
Despite its command-line heritage, Perl has even made it
ashore on the Macintosh. Not that there's anything wrong
with that. A variety of resources for the MacPerl project
can be found the
MacPerl 5 site.
Who's Afraid of Perl?
The Perl You Need to Know
Running Perl Programs
|