Active Outline

General Information


Course ID (CB01A and CB01B)
CISD033A
Course Title (CB02)
Programming in PERL
Course Credit Status
Credit - Degree Applicable
Effective Term
Fall 2023
Course Description
A complete coverage of the core Perl language. Topics covered will include: basic loops and control structures, the elemental data types and operators, subroutines and variable scooping, regular expressions and text parsing, manipulation of files, advanced list processing with grep and map, references, built-in functions and core modules, and advanced input/output including random-access files and formatting.
Faculty Requirements
Course Family
Not Applicable

Course Justification


Perl is an important language in several important programming activities, including system administration, web servers, management of interfaces between programs and various string management applications. It is CSU and UC transferable and belongs on the Programming in Perl Certificate.

Foothill Equivalency


Does the course have a Foothill equivalent?
No
Foothill Course ID

Course Philosophy


Formerly Statement


Course Development Options


Basic Skill Status (CB08)
Course is not a basic skills course.
Grade Options
  • Letter Grade
  • Pass/No Pass
Repeat Limit
0

Transferability & Gen. Ed. Options


Transferability
Transferable to both UC and CSU
°®¶¹´«Ã½ GEArea(s)StatusDetails
2G4MDA and 4-yr GE Math AgApproved

Units and Hours


Summary

Minimum Credit Units
4.5
Maximum Credit Units
4.5

Weekly Student Hours

TypeIn ClassOut of Class
Lecture Hours4.08.0
Laboratory Hours1.50.0

Course Student Hours

Course Duration (Weeks)
12.0
Hours per unit divisor
36.0
Course In-Class (Contact) Hours
Lecture
48.0
Laboratory
18.0
Total
66.0
Course Out-of-Class Hours
Lecture
96.0
Laboratory
0.0
NA
0.0
Total
96.0

Prerequisite(s)


Corequisite(s)


Advisory(ies)


ESL D272. and ESL D273., or ESL D472. and ESL D473., or eligibility for EWRT D001A or EWRT D01AH or ESL D005.

CIS D022B or CIS D026A

Limitation(s) on Enrollment


Entrance Skill(s)


General Course Statement(s)


Methods of Instruction


Discussion of assigned reading

Discussion and problem solving performed in class

Lecture and visual aids

Quiz and examination review performed in class

Homework and extended projects

Collaborative learning and small group exercises

Collaborative projects

Laboratory experience which involve students in formal exercises of data collection and analysis

Laboratory discussion sessions and quizzes that evaluate the preceding weeks laboratory exercises

Assignments


  1. Reading: Required reading from text and handouts
  2. Writing: Six to nine scripts of increasing length covering the Lab Topics specified in X. (half completed in the computer lab, half completed for homework)

Methods of Evaluation


  1. A minimum of one one-hour midterm exam with at least two multi-line Perl scripts which must be correct and complete code that conforms to the Perl style guide. Also correct completion of laboratory assignments and homework assignments that conforms to the Perl style guide.
  2. A comprehensive final exam including the writing of scripts involving topics of course which must be correct and complete code that conforms to the Perl style guide.

Essential Student Materials/Essential College Facilities


Essential Student Materials: 
  • None.
Essential College Facilities:
  • Access to a computer with a Perl recent version Interpreter

Examples of Primary Texts and References


AuthorTitlePublisherDate/EditionISBN
Wall, Larry, Tom Christiansen, bryan d foy, and Jon Orwant. "Programming Perl: Unmatched power for text processing and scripting, edition 4", Sebastopol, CA: O'Reilly Media, 2012.

Examples of Supporting Texts and References


AuthorTitlePublisher
Swartz, Randal L., brian d foy, and Tom Phoenix, "Lerning Perl: Making Easy Things Easy and Hard Things Possible, Edition 7", 2016
Beginning Perl (first edition) by Simon Cozens free on-line at: http://www.perl.org/books/beginning-perl
http://perldoc.perl.org

Learning Outcomes and Objectives


Course Objectives

  • Create programs using regular expressions and scalar operators to parse, analyze and error-check files, user input and other data.
  • Create programs which create and use lists and move data between lists and files
  • Create programs which create and use hashes to store data, prevent duplicate data, and count frequencies of occurrence of events.
  • Create programs which generate files and/or manipulate files and their attributes
  • Create programs which search for or alter substrings within strings
  • Create programs which selectively access portions of files rather than entire
  • Create programs which use advanced list functions to filter out elements of a list or use formulae to change the contents of a list
  • Create programs which use references to pass lists or hashes to functions or to build multidimensional data structures
  • Create programs that access the operating system with command substitution and pipes
  • Review the items needed as background for this course.

CSLOs

  • Design, code, document, analyze, debug, and test introductory level Perl programs that include Perl modules and use operating system features.

Outline


  1. Create programs using regular expressions and scalar operators to parse, analyze and error-check files, user input and other data.
    1. Testing user input from a terminal against a regular expression
    2. Regular expressions and substitution
    3. Saving and using fields captured by a regular expression
    4. The arithmetic operators
    5. The string casing functions
    6. The concatentation and replication operators
    7. The matching operator
    8. The translation operator
    9. Boolean operations and the if statement
    10. Using inverted if statements
  2. Create programs which create and use lists and move data between lists and files
    1. Constructing lists
    2. Removing elements from lists with pop and shift
    3. Adding elements to a list with push, unshift, and splice
    4. Creating lists with split, match global, and match tagged field
    5. The concept of list in a scalar context
    6. Command line arguments and the @ARGV built-in list including use of (less than symbol)ARGV(greater than symbol) and $ARGV
    7. Building a list from file data
    8. Collapsing a list into a scalar with join function
    9. Iterating over a list with foreach
    10. Iterating over a list with the for loop
    11. Iterating over a list with the while loop
    12. Iterating over a list with an until loop
    13. Iterating with a do while loop
    14. Iterating with a do until loop
  3. Create programs which create and use hashes to store data, prevent duplicate data, and count frequencies of occurrence of events.
    1. Constructing hashes
    2. The basic hash manipulation functions keys, values, delete, exists,and each index
    3. Using hashes for applications that must access data by a string key rather than an array index
    4. Using hashes to remove duplicate data from a list or file
  4. Create programs which generate files and/or manipulate files and their attributes
    1. Opening files
    2. Reading and writing files
    3. Gathering data from chaotically formatted files
    4. Gathering data from files with regular field delimiters
    5. Writing formatted files with the print function
    6. Getting file attibutes with the filetest operators
    7. Changing file access permissions with the chmod function
    8. Renaming files with the rename function
    9. Removing files with the unlink function
    10. Copying files with the copy function
  5. Create programs which search for or alter substrings within strings
    1. The index function
    2. The rindex function
    3. The rvalue form of the substr function
    4. The lvalue form of the substr function
  6. Create programs which selectively access portions of files rather than entire
    1. The built-in $.Variable
    2. Using $. To access files by line number
    3. Accessing a range of line numbers with..
    4. Accessing files via pattern matching with the.. and .. operators
    5. Random file access with seek and tell
  7. Create programs which use advanced list functions to filter out elements of a list or use formulae to change the contents of a list
    1. Selecting and filtering lists with the grep function
    2. Transforming list elements with the map function
  8. Create programs which use references to pass lists or hashes to functions or to build multidimensional data structures
    1. Passing lists and hashes to subroutines by reference
    2. Building multidimensional data structures with references
    3. Using grep and map with reference-based data structures
  9. Create programs that access the operating system with command substitution and pipes
    1. Command substitution in a scalar context
    2. Command substitution in a list context
    3. Writing to pipes
    4. Reading from pipes
  10. Review the items needed as background for this course.
    1. Design, code, debug, and document programs using appropriate modularity and coherent functions. Pass arguments be value and by address.
    2. Design, code, and test programs using structures with arrays, functions, and pointers and also using pointers with arrays, functions, and structures.
    3. Design, code, and test programs using the string Input/Output functions and string manipulation functions. Create functions to manipulate strings.
    4. Use UNIX/Linux shell commands, including pipe and tee.
    5. use the UNIX/Linux directory structure.
    6. Use regular expressions.

Lab Topics


  1. User input evaluation and arithmetic expression evaluation
  2. Creation pf lists from file data and list slicing
  3. Creation of hashes from file data and use in duplicate prevention and frequency counting
  4. File attribute testing
  5. Use of grep and map power tools for loop-less list processing
  6. Use of references to create multidimensional data structures and to pass lists and hashes to subs by reference
Back to Top