Perl Programming on UNIX
Course Description
Perl has been described as C, awk, sed, and shell programming all wrapped into one language. In this intense, 5-day, hands-on programming course, you will learn how to take advantage of Perl`s power through examples and extensive exercises. Arrays and hashes, I/O, regular expressions, subroutines, and complex data structures are covered in depth. The course also introduces object-oriented programming in Perl, as well as UNIX multi-tasking and Perl sockets programming.
5 days
Contact us for pricing
Prerequisites
Fundamentals of UNIX. Experience in a high-level programming language, such as C, C++, or Java, is strongly recommended.Course Introduction
Course ObjectivesCourse Overview
Using the Workbook
Suggested References
Overview of Perl
What is Perl?Running Perl Programs
Sample Program
Another Sample Program
Yet another Example
Perl Variables
Three Data TypesVariable Names and Syntax
Variable Naming
Lists
Scalar and List Contexts
The Repetition Operator
Arrays and Hashes
ArraysArray Functions
The foreach Loop
The @ARGV Array
The grep Function
Array Slices
Hashes
Hash Functions
Scalar and List Contexts Revisited
Quoting and Interpolation
String LiteralsInterpolation
Array Substitution and Join
Backslashes and Single Quotes
Quotation Operators
Command Substitution
Here Documents
Operators
Perl OperatorsOperators, Functions and Precedence
File Test Operators
Assignment Operator Notations
The Range Operator
Flow Control
Simple StatementsSimple Statement Modifiers
Compound Statements
The next, last, and redo Statements
The for Loop
The foreach Loop
I/O: Input Operations and File I/O
Overview of File I/OThe open Function
The Input Operator < >
Default Input Operator
The print Function
Reading Directories
Regular Expressions
Pattern Matching OverviewThe Substitution Operator
Regular Expressions
Special Characters
Quantifiers (*, +, ?, {})
Assertions (
Advanced Regular Expressions
, $, \b, \B)Subroutines
SubstringsSubstrings in List Context
RE Special Variables
RE Options
Multi-line REs
Substituting with an Expression
Perl RE Extensions
References
Overview of SubroutinesPassing Arguments
Private Variables
Returning Values
Complex Data Structures
ReferencesCreating References
Using References
Passing References as Arguments to Subroutines
Anonymous Composers
The Symbol Table
Packages and Modules
Two-dimensional Arrays in PerlAnonymous Arrays and Anonymous Hashes
Arrays of Arrays
Arrays of References
A Hash of Arrays
A Hash of Hashes
And So On...
Introduction to Object-Oriented Programming in Perl
PackagesBEGIN and END Routines
require vs. use
Modules
The bless Function
Binary Data Structures
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
Multitasking with Perl
Variable-Length (Delimited) FieldsVariable vs. Fixed
Handling Binary Data
The pack Function
The unpack Function
The read Function
C Data Structures
Sockets Programming in Perl
What are Single and Multitasking?UNIX Multi-tasking Concepts
Process Creation with fork
Program Loading with exec
File Descriptor Inheritance
How UNIX Opens Files
One-Way Data Flow – Pipes
Final Result - Page Viewing
UnixUnix AdministrationUnix ScriptingUnix Shell ScriptingLinuxPerlPerl Programming