In this 5 day Perl training class, students will learn to program effectively in Perl.
Goals
- Learn to work with variables, arrays and hashes in Perl
- Learn to write flow control statements in Perl
- Learn to manipulate files with Perl
- Learn to use Perl’s Regular Expressions
- Learn to create complex data structures with Perl
- Learn to use Perl packages and modules
- Learn to work with Perl’s object-oriented features
- Learn to write subroutines in Perl
Outline
- Overview of Perl
- What is Perl?
- Running Perl Programs
- Sample Program
- Another Sample Program
- Yet Another Example
- Perl Variables
- Three Data Types
- Variable Names and Syntax
- Variable Naming
- Lists
- Scalar and List Contexts
- The Repetition Operator
- Arrays and Hashes in Perl
- Arrays
- Example – The @ARGV Array
- Array Slices
- Hashes
- Hash Functions
- Scalar and List Contexts Revisited
- I/O: Input Operations and File I/O in Perl
- Overview of File I/O
- The open Function
- The Input Operator < >
- Default Input Operator
- The print Function
- Reading Directories
- Operators in Perl
- Perl Operators
- Operators, Functions and Precedence
- File Test Operators
- Assignment Operator Notations
- The Range Operator
- Flow Control in Perl
- Simple Statements
- Simple Statement Modifiers
- Compound Statements
- The next, last, and redo Statements
- The for Loop
- The foreach Loop
- Regular Expressions in Perl
- Pattern Matching Overview
- The Substitution Operator
- Regular Expressions
- Special Characters
- Quantifiers (*, +, ?, {})
- Assertions (^, $, \b, \B)
- Subroutines in Perl
- Overview of Subroutines
- Passing Arguments
- Private Variables
- Returning Values
- Quoting and Interpolation in Perl
- String Literals
- Interpolation
- Array Substitution and Join
- Backslashes and Single Quotes
- Quotation Operators
- Command Substitution
- Here Documents
- References
- References
- Creating References
- Using References
- Passing References as Arguments to Subroutines
- Anonymous Composers
- The Symbol Table
- Complex Data Structures in Perl
- Two-dimensional Arrays in Perl
- Anonymous Arrays and Anonymous Hashes
- Arrays of Arrays
- Arrays of References
- A Hash of Arrays
- A Hash of Hashes
- And So On…
- Perl Packages and Modules
- Packages
- BEGIN and END Routines
- require vs. use
- Modules
- The bless Function
- Object-Oriented Programming in Perl
- What is Object-Oriented?
- Why Use Object-Oriented Programming?
- Classes, Objects, and Methods in Perl
- Inheritance, the “is-a” Relationship
- Containment, the “has-a” Relationship
- Overloaded Operators
- Destructors
- Advanced Regular Expressions in Perl
- Substrings
- Substrings in List Context
- RE Special Variables
- RE Options
- Multi-line REs
- Substituting with an Expression
- Perl RE Extensions
- Binary Data Structures in Perl
- Variable-Length (Delimited) Fields
- Variable vs. Fixed
- Handling Binary Data
- The pack Function
- The unpack Function
- The read Function
- C Data Structures
To Hire an AMS Perl / CGI Subject Matter Expert and Instructor who also teaches this class, call us today at 800-798-3901!