Programming in Perl

CSCI-2230

Wednesdays, 4-5:50pm, DCC 324

perlS03@cs.rpi.edu

IMPORTANT FINAL EXAM INFO

Name Email Office Office Hours Phone AIM
Instructor: Paul Lalli lallip@cs.rpi.edu Lally 004 T 3:30-4:30
F 12:00-1:00
276-8988 PerlRPI
Undergrad TAs: David Foster fosted@cs.rpi.edu CII 3130 R 3:00-4:00
Richard Conlan conlar@rpi.edu CII 3112 M 1:00-2:00
James Konrad konraj@cs.rpi.edu VCC South T 2:00-3:00
Course Texts "Required" Optional Suggested
Title: Programming Perl Learning Perl CGI Programming With Perl Mastering Perl/Tk
Authors: Larry Wall, Tom Christiansen,
& Randal L. Schwartz
Randal L. Schwartz & Tom Phoenix Scott Guelich et al Steve Lidie & Nancy Walsh
Edition: 3rd 3rd 2nd 1st
Publishers: O'Reilly O'Reilly O'Reilly O'Reilly
ISBN: 0-596-00027-8 0-596-00132-0 1-565-92419-3 1-56592-716-8

Course Info Announcements Course Policies Syllabus Perl Quotes Hyperlinks Definitions & Acronyms Homeworks Handouts Check Grades

Announcements

Thursday, May 1, 2003
Wednesday, April 23, 2003
Monday, April 21, 2003
Wednesday, April 16, 2003
Wednesday, April 9, 2003
Sunday, March 30, 2003
Wednesday, March 26, 2003
Wednesday, March 19, 2003
Thursday, March 6, 2003
Wednesday, March 5, 2003
Tuesday, March 4, 2003
Tuesday, February 25, 2003
Thursday, February 20, 2003
Wednesday, February 19, 2003
Thursday, February 13, 2003
Tuesday, February 11, 2003
Friday, February 7, 2003
Thursday, February 6, 2003
Wednesday, February 5, 2003
Saturday, February 1, 2003
Wednesday, January 22, 2003
Thursday, January 16, 2003
Monday, January 13, 2003
Saturday, January 11, 2003
Tuesday, November 26, 2002

Course Info Announcements Course Policies Syllabus Perl Quotes Hyperlinks Definitions & Acronyms Handouts Homeworks Check Grades

Course Policies

This 2-credit course will run the entire semester, from 4:00pm to 5:50pm on Wednesdays.

There will be one homework assigned aproximately every two weeks, for a total of Aproximately seven (7) assignments throughout the course of the semester. Submission instructions will be included with each assignment. All homeworks will be due at 11:59:59pm Eastern Time on the due date. Homework will be accepted up to 24 hours past the deadline at a penalty of 20% off the homework's grade. Homeworks turned in more than 24 hours past the deadline will be graded a 0.

There will be a final exam on the last day of class. You will have the full 1 hour, 50 minutes to work on the exam. The final exam will require you to apply knowledge gained during the entire course, but will focus on specific material from the second half.

Your course grade will be derived by taking either
70% of the Homework average and 30% of the Final Exam
or
80% of the Homework average and 20% of the Final Exam,
whichever results in a higher course average for each student.

Each homework will have the same weight.

Your letter grade will be computed based on the following scale: (numeric grades will be rounded to the nearest tenth of a point)

A
>= 90.0%
B
80.0%-89.9%
C
70.0%-79.9%
D
60.0%-69.9%
F
< 60.0%

Do NOT expect a curve or scale. If there are extreme circumstances (ex, everyone in the class is getting an F), I may consider scaling the final grades, but don't plan for it. Along the same lines, under no circumstances will there be any opportunity to salvage a grade by redoing an assignment or by doing an 'extra credit' asignment.

Academic Integrity

All homeworks are to be done individually, unless specifically noted otherwise. You may discuss programming style, concepts, and error debugging with your classmates, but you may not work together on an assignment. Do not look at anyone else's code, and do not show your code to anyone else.

All of the following are considered violations of Academic Integrity, and will be penalizied equally:

In addition, YOU are responsible for ensuring that no other student is able to access your code. Take any and all necessary precautions to prevent this.
In all cases of academic dishonesty, no attempt will be made to determine which submission is "Authentic" or "Original". Both students will be penalized equally, as follows:

When taking the final exam, you may use only the resources specifically noted as acceptable. These may or may not include lecture notes, your own notes, the course textbooks, or other books. Under no circumstances will these include any other students. Acceptable resources will be noted at least two (2) weeks prior to the exam.

RPI-Speak:
"The definitions and examples presented (in the Rensselaer Handbook) are samples of the various types of academic dishonesty and are not to be construed as an exhaustive or exclusive list. The academic dishonesty policy applies to all students, undergraduate and graduate, and also to scholarly pursuits and research. Additionally, attempts to commit academic dishonesty or to assist in the commission or attempt of such an act, are also violations of this policy.
. . .
If found in violation of academic dishonestly policies, students may be subject to two types of penalties. The Instructor administers an academic (grade) penalty, and the student may be subject to the procedures and penalties of the student judicial system outlined in this handbook.
. . .
If it is concluded that a student has violated the Institute academic dishonesty policy, it is the faculty member's responsibility to determine the academic (grade) penalty (i.e., failure of the course, significant reduction of the final grade, etc.)" -- The Rensselaer Handbook of Student Rights and Responsibilities
English:
You cheat, you fail -- Paul Lalli

Course Info Announcements Course Policies Syllabus Perl Quotes Hyperlinks Definitions & Acronyms Handouts Homeworks Check Grades

Syllabus

NOTE: This schedule is Tentative. The topics we cover each week will depend almost entirely on how much we were able to cover in the previous lecture.

Date Lecture Notes Topics Covered Programming Perl
NONE HTML Basics (PDF) * The very basics - html, head, title, body, font, lists, table, etc
NONE Unix Basics (PDF) * The very basics - cd, mkdir, ls, rm, rmdir, chmod, etc
Jan 15 Introduction to CSCI-2230 (PDF) Policies, Info, etc
Jan 15 Introduction to Perl (PDF) shebang, basic I/O, variables Chapter 1 + pgs 45-60, 72-78
Jan 22 Interpolation (PDF), Context (PDF), Operators (PDF), File/Directory access (PDF) variable & backslash interpolation, scalar/list context, operators, operator precedence, File & Directory manipulation pgs 60-72, 78-85, + Chapter 3
Jan 29 Built-in Functions (PDF), Command Line arguments (PDF), Control Structures (PDF), Running External Programs (PDF) @ARGV, push, pop, splice, shift, unshift, keys, values, sort, length, index, reverse, stat, if-else, while, do, for, foreach, next, last, redo, until, unless, backticks, system, pipes pgs 111-126, parts of Chapter 29
Feb 5 Regular Expressions (PDF) Intro to regexps, basics of regexps pgs 139-178
Feb 12 More Regular Expressions (PDF), More Built-In Functions (PDF) modifiers, transliteration, Lookaround Assertions; map, grep, glob, each pgs 178-202, more of Chapter 29
Feb 19 References (PDF), Subroutines (PDF) named & anonymous references, multi-dimentional arrays and hashes; defining & calling subroutines, parameters, prototypes, return values Chapter 6, Chapter 8
Feb 26 NO CLASS
Mar 5 Object oriented programming (PDF) classes, methods, standard modules & pragmas pgs 308-321
Mar 19 Debugging Perl scripts (PDF) warn, die, command line switches, perldebug Chapter 20
Mar 26 CGI Programming (PDF) CGI Basics - forms, methods, etc Mouse,
CGI.pm docs,
Another documentation
Actual CGI.pm file
Apr 2 More CGI (PDF) HereDocs, Multiple Submits, Emailing, Cookies, File Uploading
Apr 16 GUI with Perl (PDF) Intro to Event-Driven programming, Perl/Tk Emu,
Perl/Tk FAQs,
Perl/Tk.org,
`perldoc Tk` (on RPI CS system)
Apr 23 Review for Final Exam Question and Answer Session
Apr 30 Final Exam
* These topics will not be covered in class. It is presumed that most students have a passing familiarity with these two topics. The presentations here are merely a reference for those who are not accustomed to Unix or HTML.
Course Info Announcements Course Policies Syllabus Perl Quotes Hyperlinks Definitions & Acronyms Handouts Homeworks Check Grades

Perl Quotes

A great many things have been said about Perl. Many of them quite funny. If you happen to come across a passage about Perl that makes you grin or laugh, please share your good fortune with the rest of the class.

Enter the Quote
Your name
Source (author, site, reference, etc)
Leave fields blank to view existing quotes

Course Info Announcements Course Policies Syllabus Perl Quotes Hyperlinks Definitions & Acronyms Homeworks Check Grades

Links

The following hyperlinks may be useful to your learning of Perl and your success in this course:

Please feel free to suggest another link


Course Info Announcements Course Policies Syllabus Perl Quotes Hyperlinks Definitions & Acronyms Handouts Homeworks Check Grades

Definitions & Acronyms

The following terms will be used frequently throughought this course.
C
Probably the industry-standard programming language. Paul likes to live in denial that it exists, but perl is actually written in C.
Camel
Nickname for Programming Perl, the book on Perl
camel
"Kind of a horse designed by committe." The pseudo-official mascot of Perl. The association of camels with Perl is trademarked by O'Reilly - so don't tell them Paul uses a camel for PerlRPI's buddy icon.
CPAN
Comprehensive Perl Archive Network. Repository for all Perl modules not included in the core distribution
Java
Ewwwwwwwww!
Labstaff
The RPI Computer Science department's group of staff responsible for maintaining the Computer Science network - which is completely distinct from RCS. They can be reached at labstaff@cs.rpi.edu
Lalli
Your instructor. Not to be confused with Lally
Lally
Your instructor's office building. Not to be confused with Lalli
Llama
Nickname for Learning Perl, an extremely good tutorial for Perl
Mouse
Nickname for CGI Programming with Perl, an excellent reference for learning to create CGI scripts using Perl
Perl
Pratical Extraction and Report Language. The language we study in this course. Note this is *not* an acronym (it's a retronym), so don't make it all-caps.
perl
the implementation of Perl. ie, the program that runs your Perl script.
RCS
Rensselaer Computer Systems. The network of computer systems and terminals all over campus. In reality, the network includes machines which run Windows, Unix, and Macintosh. As far as this class is concerned, "RCS" refers soley to the Unix machines on which perl is installed.
RCS Id
Rensselaer Computer Systems Identification. Your login Id. The first part of your email address. Not to be confused with your RIN.
RegExps
Regular Expressions. The power-house of Perl
RIN (aka RPI Id #)
Rensselaer Id Number. The way the registrar identifies you. The nine-digit number that replaced your social security number a few years ago. Not to be confused with your RCS Id
RPI
You should know this one
TLA
Three Letter Acronym
TMTOWTDI
There's More Than One Way To Do It. The motto of Perl.
Wall, Larry
The creator and primary maintainer of Perl. To say he has issues is something of an understatement. See what I mean?

Valid XHTML 1.0!