Perl Programming
Revision: TE2601_20061001
(8.64 KB) View, Download, or Print Catalog as a PDF.
Course Length:
5 Days
Course Description:
Perl is a scripting language which allows for rapid prototyping of projects formerly done with a programming language or a shell. It incorporates all the functionality of C (including a UNIX system interface), the Shells, grep, sed, and awk. The topics in the course will aid all computer users - from end user to programmer to administrator alike. Many in class labs support the course material.
Who Should Attend:
This course is for programmers, end users, system administrators, network administrators, CGI script writers, or anybody who is interested in automating tasks but doesn't want to learn all the details of a full blown programming language.
Benefits of Attendance:
Upon completion of this course, students will be able to:
- Manipulate files and directories
- Use arrays and array functions to solve a wide variety of problems
- Use the powerful regular expression capabilities of Perl
- Generate reports
- Use hashes to solve commonly encountered problems
- Take advantage of Perl's powerful system interface
- Write programs that solve many system administrator problems
- Use Perl to write CGI applications
- Use Modules from the standard Perl distribution
- Use Perl references
Prerequisites:
Students should have some experience with either a programming language (preferably C), or any of the UNIX shells.
Course Outline:
- Chapter 1: A Tutorial Introduction to Perl
- What is Perl?
- Where Can I Get Perl?
- The First Perl Program
- Simple I/O
- Perl Variables
- Numbers
- Arrays
- Array Functions
- Arrays and STDIN
- Control Flow Constructs
- Altering Loop Control Flow - last
- Altering Loop Control Flow – next
- Altering Loop Control Flow – redo
- Labeled Blocks For Long Breaks
- Statement Modifiers
- What Is True And What Is False?
- Associative Arrays
- The Special Built In Variable $_
- Pattern Matching with Regular Expressions
- Writing Your Own Functions
- Chapter 2: I/O
- Introduction
- The print Function
- The printf Function
- The sprintf Function
- Filehandles
- Opening Disk Files
- File Open Errors
- Closing Files
- Opening Pipe Files
- Command Line Arguments
- File Operators
- The stat Operator
- The _ filehandle
- Chapter 3: Operators
- Introduction
- Table Of Perl Operators
- Assignment Operators
- Special String Operators
- Relational Operators
- Logical Operators
- Arithmetic Operators
- The Conditional Expression
- Range Operator
- Regular Expression Operators
- String Operators
- Chapter 4: Arrays and Array Functions
- Introduction
- Assigning Values To An Array
- Subscripting An Array
- Array Functions
- push and pop
- shift
- sort, reverse, and chop
- split and join
- grep
- splice
- Associative Arrays
- Associative Array Functions
- Associative Array Example
- Built-in Associative Arrays
- Reading From A File Into An Associative Array
- Chapter 5: Subprograms
- Subroutines
- Passing Arguments to Subroutines
- Returning Values from Subroutines
- The require Function
- @INC
- Packages
- Modules and use
- Typeglobs
- Predefined Subroutines
- Chapter 6: Data Structures
- References
- Syntactic Sugar
- Anonymous Arrays
- Higher Dimensional Arrays
- References and Subroutines
- Chapter 7: Accessing System Resources
- Introduction
- File and Directory System Calls
- mkdir, chdir, and chmod
- opendir and readdir
- link, unlink, and rename
- Time Stamps for Disk Files - utime
- Process Creation - fork
- exec and wait
- Signals
- system
- Chapter 8: Odds and Ends
- eval
- warn
- Quoting
- Sorting With Custom Comparison Functions
- here Strings
- tr
- pack and unpack
- Regular Expressions
- Command Line Options
- Debugging
- The strict.pm Module
- The -w flag
- The Perl Debugger
- Chapter 9: Generating Reports with Perl
- Introduction
- Formats
- Multi-Line Format
- Filled Field Format
- Top-of Page Format
- The select Operator
- Special Format Variables - $~, $^
- A Sample Report Generator
- Sample Input File
- Sample Output
- Chapter 10: A CGI Primer
- Introduction
- A Typical Form
- Web Servers + Web Clients
- HTML
- HTML Form Tags
- CGI Input
- The GET Method
- Browser's Rendering of "getmethod.html"
- The CGI Script for "getmethod.html"
- The Browser's Rendering of the CGI Output
- CGI Output
- Environment Variables
- Decoding Form Data
- The Perl Script to Process guestbook.html
- Browsers Display of the CGI Output
- CGI.pm
- Appendix A: Additional Miscellaneous Information
- Perl Command Line Options
- The Perl Debugger
- Perl Regular Expression Metacharacters
- Formats for pack and unpack
- Some Special Perl Variables
- What is in the Advanced Perl Course
- A Taste of Object Orientation
- A Taste of Client/Server Network Programming
- References



