Laboratory Exercises for Introduction to Perl
Homework: Get Acquainted With Unix
If you are a newcomer to Unix or would like a refresher, please do the following assignment outside of class:
This will review some basic commands, like changing directories, editing files, running programs, etc.. Once you are familiar with this material, you should be prepared to do the laborary exercises.
Setup Initial Directory
Before doing the exercises, you will need to create a copy of the programs and data files in a directory in your account on ada. (See alternate instructions if you are not using one of our computers.)
- Login to ada or eos.
- Enter the following command on ada:
- or on eos:
- You will be prompted to select a directory name which will be created, into which the files will be copied. The default is /scratch/user/USER/PerlLab/ (ada) or /scratch/USER/PerlLab/ (eos), and you can just hit the Enter key to accept that.
- Change to the new directory. If you used the default:
- List the contents to make sure your setup is correct:
You should see:
Lab1 Lab2 Lab3 ... README Slides
The Slides directory contains material from the presentation slides. The Labi directories contains the material for these exercises.
- Proceed to exercises.
Skip this section if you are using ada and have completed the preceding section.
- Login to your computer.
- Make sure you have perl available. Installation instructions are at perl.org.
- Download the exercises (Windows - zip format) (Linux/OS X - tar.gz format)
- Extract the files into your chosen directory (known as a "folder" on some operating systems).
- Open a terminal or other command-line interface.
- Proceed to exercises in next section.
The following exercises should help to get you familiar with different aspects of programming Perl. There are questions, hints, and solutions available interactively, so you can go at your own pace. Feel free to skip exercises which you don't think are relevant to your work. You can always go back and do them later.