Perl Programming Course Overview
The
Perl Programming course is designed to give delegates the knowledge to develop/maintain Perl scripts.
Skills Gained
The delegate will learn to:
- Declare variables and initialise them
- Understand scalar and list context
- Construct expressions with arithmetic, logical and relational operators
- Use iterative type statements
- Use conditional statements
- Read/write text and binary files
- Manipulate text using regular expression
- Use and code subroutines
- Use built-in library functions
- Use arrays and hashes
- Declare and use packages
Who will the Course Benefit?
Programmers who need to write or maintain scripts in Perl.
Experience of programming in another programming language is required.
Course Objectives
Knowledge of Perl to write, maintain and understand Perl scripts.
Requirements
Experience of programming in another programming language is required.
NOTE: Course technical content is subject to change without notice.
Perl Programming Training Course
Course Contents - DAY 1
Course Introduction
- Administration and Course Materials
- Course Structure and Agenda
- Delegate and Trainer Introductions
Session 1: INTRODUCTION AND BASIC SYNTAX
- What is PERL and why PERL is useful
- How to run PERL programs on UNIX and Windows platform
- A simple PERL Program
- Labs
Session 2: OPERATORS AND CONTROL FLOW
- Scalar variables - usage
- Basic arithmetic operators & how they work with scalar operands
- What an expression is
- How to use the if statement and the == operator
- Two-way and multi-way branching using else and elsif
- Simple loops using while and until statements
- Labs
Session 3: SCALAR CONTEXT AND SCALAR VALUES
- Scalar values and scalar context
- Integer and floating point representation
- Octal and Hexadecimal notations
- Character strings, single and double quote representation
- Escape sequences
- Interchangeability of character and numeric values
- Labs
Session 4: MORE OPERATORS
- More arithmetic operators, **, % and - (unary)
- Integer and string comparison operators
- Logical operators
- Bit manipulation operators
- Compound assignment operators
- Autoincrement and autodecrement operators
- Concatenation and repetition operators
- Conditional and comma operators
- Labs
Session 5: LIST CONTEXT & ARRAY VARIABLES
- What lists are
- Relationship between scalars and lists
- Storing lists in array variables
- Accessing elements of arrays and lists
- Range operator
- Array assignment in scalar and list context
- Library functions used with lists
- Labs
Perl Programming Training Course
Course Contents - DAY 2
Session 6: LIST CONTEXT & ARRAY VARIABLES
- What lists are
- Relationship between scalars and lists
- Storing lists in array variables
- Accessing elements of arrays and lists
- Range operator
- Array assignment in scalar and list context
- Library functions used with lists
- Labs
Session 7: PATTERN MATCHING
- How pattern matching works
- Pattern matching operators
- Pattern matching special characters
- Labs part I
- Pattern matching options
- Pattern substitution
- Pattern tagging
- Translation
- Labs
Session 8: SUBROUTINES
- What is a subroutine
- How to define and invoke subroutines
- Argument passing and return values from a subroutine
- Typeglob for argument passing
- Local and global variables in subroutines
- How to nest subroutines
- How to use recursive subroutines
- Special system subroutines - AUTOLOAD, BEGIN and END
- Labs
Session 9: ASSOCIATIVE ARRAYS
- What an associative array is
- How to define and use associative arrays
- Initialising and extending hashes
- Assigning and copying hashes
- How to delete elements of an associative array
- How to loop using associative arrays
- Library function used with associative arrays
- How to build advanced data structures using associative arrays
- Labs
Session 10: MULTI THREADING
- What is Multithreading
- How to check the perl interpreter for multi thread capability
- Create a simple Multi Thread program
- More complex example of multi threading
- Problems with multi thread programs
- Labs
Perl Programming Training Course
Course Contents - DAY 3
Session 11: MISCELLANEOUS SYSTEM & DATA MANIPULATING FUNCTIONS
- Handling Errors - die, warn, eval
- Handling exceptions - throw, catch
- Handling signals - %SIG hash, kill, alarm, sleep
- Directory manipulation functions
- File attribute functions
- Labs
Session 12: ARRAYS & HASHES
- Multi-dimensional arrays
- Hashes containing arrays
- Hashes of hashes
- Labs
Session 13: MODULES & PACKAGES
- Namespaces
- Scope resolution operator
- Package declaration
- Use and require
- Data hiding and exporting
- Finding libraries and modules - @INC and %INC
- Setting the search path
- Labs