CS 105 Computer Programming: Perl
Spring 2010 (unique # 53990)

When Mondays and Wednesdays at 11:00-12:00 from January 20 through March 10
Where RAS 312
Web http://www.cs.utexas.edu/users/cdunham/cs105/
Instructor Curtis Dunham
Office hours Tuesdays 11:30-12:30 and Thursdays 12:30-1:30 in TAY basement, or by appointment
E-mail cdunham at cs.utexas.edu (Please include cs105 in the subject)

Course Objectives

Perl is a programming language that combines the modern robustness of Java with the expedient pragmatism of scripting languages. It offers both the low-level system access of C and the high-level elegance of Lisp. One of its mottoes is, “There’s More Than One Way To Do It.” Its flexibility makes Perl a powerful tool, but its permissiveness can lead to incomprehensible code or mysterious bugs.

This course provides a brief introduction to the language for students who want to add Perl to their toolbox. It assumes familiarity with the fundamental elements of computer programming, but no prior experience with Perl or any other particular language is necessary. Brief weekly assignments will give students hands-on experience writing, debugging, and revising Perl programs. A final project will exercise students' ability to develop a slightly more involved program, integrating concepts familiar from the weekly assignments.


No textbook is required. All assignments should be possible to complete using only the lecture notes and the Perl documentation that it specifically mentions. The perl man page is a great place to start.

However, to get the most out of this course and Perl itself, a book is a great investment. The standard O'Reilly trilogy is Learning Perl (the llama book), Intermediate Perl (the alpaca book), and Programming Perl (the camel book). My presentation will be aimed at maximizing pedagogical value, just like the Llama, so in a sense it is redundant with the lecture materials, but depending on your learning style it may be helpful to have an alternative. The Camel on the other hand is more of a reference, which may be helpful if you want an alternative to the online documentation.


Students are encouraged to attend every lecture. Any lecture slides or code samples will appear after class at the bottom of this page (linked from the lecture number).

Office Hours

Office hours will be held as listed above, in the computer lab in the basement of Taylor Hall, unless otherwise announced in class. If you are unable to attend the usual office hours, email me to set up a meeting.


Seven weekly homeworks will be assigned, typically in Wednesday classes and due the following Monday. All homeworks will be due at 10:00 AM (one hour before classtime) on the due date. Homework will be submitted using the turnin program from a CS account. (Do not use the Microlab Turnin web page.) The instructor will run your programs on a CS machine with Perl 5.8.8, so I suggest you at least test your program on the machine that you use to run turnin. Type man turnin on a CS machine for more details. If you don't yet have a CS account, create one here. To access a CS account, visit the computer lab in the basement of Taylor Hall or log in remotely (via SSH) to a CS machine listed at CS public host status page.

Students are alotted five “slip days” to turn in assignments late. All calendar days count towards slip days (i.e. weekends are not free) and turning in your assignment just a few minutes late will use one slip day. You can only use slip days up until the next class, so if an assignment is due on Monday, only two slip days are available before you will be given a zero. A word of advice: I strongly advise you to not plan to use your slip days. You might actually need them on later assignments or the final.


Each homework assignment counts as 10% of your final grade, so all homeworks will collectively count for 70%. The final project will account for the remaining 30% of the final grade. Note that the final project will be due after the class stops meeting on March 10, but office hours will continue to be available until the due date. Grades will be posted on eGradebook. The instructor reserves the right to use attendance and class participation to improve your final letter grade if you are “on the fence.” Any questions about grades must be submitted in writing (including via e-mail).

Class Announcements and Discussion

The instructor will send class announcements through a mailing list (cs105perl10s@utlists.utexas.edu). Please sign up for this list at the UT lists web site. If you prefer not to use email, you have the option of viewing and posting messages at the web site or subscribing to an RSS feed.

This list can also be used for class discussions. Appropriate discussion topics include questions about Perl itself, requests for clarification about anything said in class, requests for help with the computing environment, etc. In general, the discussion board is for sharing information that may be of interest to classmates, but obviously homework solutions are off-limits! (Until after the next class or five days have elapsed since the due date, whichever comes first.)

Code of Conduct

See the Computer Science Department's Code of Conduct. Students are encouraged to work together to improve their understanding of the course material, but for all homework assignments, only their own work may be submitted. University policies on academic dishonesty will be strictly enforced.


1 Wed January 20 Course overview; Survey; Perl introduction; First program
2 Mon January 25 Perl basics: Variables; Sigils; Defined-ness; Truth; Control flow
3 Wed January 27 Perl basics: I/O; Context; String literals and quoting; Lists
4 Mon February 1 Intermediate iteration and file I/O; Special variables
5 Wed February 3 Intermediate Array and Hash manipulation; Quoting; Lengths and more Context
6 Mon February 8 Advanced iteration; other print functions; Variable scoping; Function introduction
7 Wed February 10 References; Data structures
8 Mon February 15 Perl warning modes; Introduction to Regular Expressions; Basis in Automata
9 Wed February 17 Regular expressions: Operators, Metacharacters, Character classes, basic assertions
10 Mon February 22 Practical regular expressions; Advanced regular expressions
11 Wed February 24 Using modules and objects; Packages
12 Mon March 1 Object-Oriented theory, examples; some real-world code
13 Wed March 3 Miscellaneous helpful things
14 Mon March 8 catch-up and/or discussion/demonstration of practical issues
15 Wed March 10 Looking ahead: new features in Perl 5.10 and Perl 6
  Wed March 24 final project due at 10:00 AM

The instructor reserves the right to adjust this schedule if necessary.