Installation and Setup  
 
 

Getting Started

What You Need:
To do this course you will need two things: the book Learning Perl 5th Edition by Randal L. Schwartz, Tom Phoenix, and brian d foy (ISBN: 978-0-596-52010-6) and a Perl interpreter (available in the CS labs and most Mac OSX installations).

Running Perl at Home:
If want to run Perl at home, you will first want to download and install the interpreter. You can download binaries for the most popular operating systems from ActiveState under the name ActivPerl here: http://www.activestate.com/activeperl/. Source distributions of Perl can be downloaded from http://www.perl.org/get.html if you prefer to compile it for your operating system. If you are running Mac OSX there is a good chance that you already have Perl installed. To determine whether Perl has been installed, type perl -v at the command line. This will tell you if it is in the PATH variable and the version that you are running.

Once you have Perl running try executing a basic script, such as the traditional "hello world" program seen on page 12. There are two ways to run any given Perl script. The first involves adding a "shebang" line as the first line in the file and will look something like #!/usr/bin/perl although everything after #! must correspond to where Perl is installed on your system. If you include a shebang line then you can execute your script by typing ./program.pl at the command line. The second option is to omit the shebang line and manually run the file through the Perl interpreter which is done by typing perl program.pl at the command line (assuming Perl is in the PATH variable). Once you are able to run the simple Perl script you are ready to dive into week 1.


Files to Be Downloaded