Biol 591 
Introduction to Bioinformatics
Notes : Introduction to Programming
Fall 2002 

Reading in Beginning Perl for Bioinformatics:

Chapters 1-3: Read/skim as much or as little as you like
Chapter 4, pp.29-36: Goal is to understand the elements of a program
Click here to get a PowerPoint file that highlights the different elements in a real Perl program

Outline:

A. Download and install Perl on your own computer
B. Enter, edit, and run a simple program
C. Look carefully at a program that does something moderately useful
D. Programming exercises
Questionnaire : Please complete after going through the notes.

A. Download and install Perl on your own computer

Click here for instructions on how to download a free copy of Perl to your PC running under some brand of Windows. Note that at the end of the page, you need to click on either XP/2000 installation or 95/98/NT/ME installation (depending on your version of Windows) to continue the instructions. Don't get impatient. The installation may take a few minutes. The installation may at completion will say
Thank you for installing ActivePerl!
Press return to exit.
The last line ("Press return to exit") may or may not appear. You may have to press the X button at the upper right corner of the window to exit.

If you have a Mac or run under some other operating system, SEE US!
 

B. Enter, edit, and run a simple program

Click here for instructions on how to write and run a simple Perl program. Do it and greet the world!
Warning! The program you're instructed to input ends with a ";". It doesn't end with a "|" (that's just the image of the cursor).

C. Look carefully at a program that does something moderately useful

Click here for a guided tour through a working program. DON'T TRY TO TYPE IN THE PROGRAM BY HAND! The notes provide a link to a file with the entire program already entered, typo-free. To download it, click on the link, and click on your browser's File, Save-As key. Save it to the directory you made in Section B.

In running the program using "| more" (as described), you'll run into a situation where you have to hit a key to go to the next lump of output. If you don't want to sit there while 100 bottles of beer get taken down one by one, then you can break out of the program by pressing the Ctrl key and (while the Ctrl key is pressed) click the Pause/Break key on your keyboard.


D. Programming exercises


Click here for a list of exercises concerning the previous program plus another. Do these before class on Friday. Don't be afraid to try anything that strikes your fancy. There's nothing you can break.

Erratum: The version you obtain may have a reference to "$n". Replace this with "$number_of_bottles" (don't include quotes).