| |
Duration: 3 days
Pre-requisite: Knowledge of a programming language like ‘C’
Day 1:
Introduction to Perl ?
Simple Input / Output statements
Scalar variables
Operators
Arithmetic operators
Relational operators
On numbers
On Strings
Logical operators
String operators
Bitwise operators
Assignment operators
Control Structures
Selection
If
Nested if
else
Looping
For
Foreach
While
Until
Special Statements
Last
Next
Redo
Arrays
Initialization
Traversal
Functions on arrays
Shift, unshift
Push, pop
Reverse
Sort
Code block with sort
Array sections / slices
Associative Arrays
Associative arrays
Creating Associative arrays
Accessing Elements of Associative Arrays
Keys
Values
Day 2:
Files
Open
Close
Modes
Read
Write
Append
Input / output
Pattern Matching
Introduction
The Match Operators
Match-Operator Precedence
Special Characters in Patterns
The + Character
The [] Special Characters
The * and ? Special Characters
Escape Sequences for Special Characters
Matching Any Letter or Number
Anchoring Patterns
Variable Substitution in Patterns
Excluding Alternatives
Character-Range Escape Sequences
Matching Any Character
Matching a Specified Number of Occurrences
Specifying Choices
Reusing Portions of Patterns
Pattern-Sequence Scalar Variables
Special-Character Precedence
Specifying a Different Pattern Delimiter
|
Pattern-Matching Options
Matching All Possible Patterns
Ignoring Case
Treating the String as Multiple Lines
Evaluating a Pattern Only Once
Treating the String as a Single Line
Using White Space in Patterns
The Substitution Operator
Using Pattern-Sequence Variables in Substitutions
Options for the Substitution Operator
Evaluating a Pattern Only Once
Treating the String as Single or Multiple Lines
Using White Space in Patterns
Specifying a Different Delimiter
The Translation Operator
Options for the Translation Operator
Day 3:
Subroutines
What Is a Subroutine?
Defining and Invoking a Subroutine
Forward References to Subroutines
Returning a Value from a Subroutine
Return Values and Conditional Expressions
The return Statement
Using Local Variables in Subroutines
Initializing Local Variables
Passing Values to a Subroutine
Passing a List to a Subroutine
Calling Subroutines from Other Subroutines
Recursive Subroutines
Predefined Subroutines
Creating Startup Code Using BEGIN
Creating Termination Code Using END
Handling Non-Existent Subroutines Using AUTOLOAD
Creating user defined Package
How to use user defined packages in other perl scripts
Use of strict pragma and warnings
Use of @ISA and @EXPORT
Use of Exporter module
Object based programming
Package
Module
|
|