Perl for Beginners

WS 2015/2016

Dr. Stephan Hutter

Course Schedule

The course takes place in Block III of the winter semester. It starts Nov 24th and ends Dec 15th 2015.
It takes place Tuesdays-Fridays (Mondays no course), 14:00-17:00 in room G00.037.

Exam

The exam will take place on Dec 15th 2015, 14:00-15:00 in room G00.001.

Exam Results

The make-up exam will take place on Tuesday, Feb 9th 2015, 13:00-14:00 in room B02.015.
If you would like to take a look at your exam or take the make-up exam, please get in contact via email.

Contents

Perl is an easy to learn and easy to use computer programming language sometimes called "the Swiss Army knife of programming languages". It is especially powerful in handling and manipulating text files.
A lot of data in biology nowadays is stored in text files (DNA/protein sequences and alignments, phylogenetic trees, data tables). With Perl you can read such data, manipulate it and perform all kinds of analysis with just a few lines of code.
This course will teach the basic concepts of the Perl programming language and we will apply those to actual biological data sets.
Previous knowledge of programming is not required for the course, but general computer skills are helpful.

Registration

The course is open to all students in the EES/MEME and Biology masters programs. PhD students are also welcome.
Due to the restricted space in the CIP-Pools the number of participants is limited to 16.
Please register via email: hutter@bio.lmu.de

Installation of Perl

On Mac OSX and Linux systems Perl is installed by default. On Windows Perl ist not installed by default, but there are several different implementations of Perl you can download for free.
The most popular ones are ActivePerl and Strawberry Perl.

Writing Perl Scripts

Perl scripts are simple text files, so any regular text editor will do. There are some IDEs (integrated development environments) that make writing scripts a bit easier (by introducing syntax highlighting, etc...).
On Mac OSX the IDE XCode is part of the operating system. For Windows a nice free IDE is Open Perl IDE. Click here for a version that already includes some minor bug fixes.

Suggested Literature

The bulk of the course is based on the excellent book Learning Perl (5th Edition) published by O'Reilly. This book is also available in German (Einführung in Perl).

Course materials

Exercises and solutions for each course day will be posted below.
Each course day will cover one or more chapters from the "Learning Perl" book and sometimes additional topics.

Day 1: General Introduction (Chapter 1), Scalar Data and Basic Control Structures (Chapter 2)
Day 2: Lists and Arrays (Chapter 3)
Day 3: Advanced Input and Output (Chapter 5)
Day 4: Subroutines (Chapter 4)
Day 5: Hashes (Chapter 6), Strings and Sorting (Chapter 14)
Day 6: Debugging, Introduction into Regular Expressions (Chapter 7)
Day 7: Pattern Matching (Chapter 8)
Day 8: Processing Text (Chapter 9)
Day 9: More Control Structures (Chapter 10)
Day 10: Perl Modules (Chapter 11), File Tests (Chapter 12), Directory Operations (Chapter 13)
Day 11: Smart matching (Chapter 15), Process Management (Chapter 16), Some Advanced Perl Techniques (Chapter 17)
Day 12: Perl In Real Life, Exam Prep