Perl Course Modules for In-house Perl Training
Combine Modules for Customised Perl Training
Most of our Perl course modules are outlined below. They can be combined in different ways to produce a wide range of specialist Perl courses. Our own "off the shelf" Perl courses are, for example, built in this way.
The modules cover Perl 5 and has been taught to users on: Unix, Linux & MS Windows. The modules have been updated to Perl 5.16.
With judicious selection, a purchasing company can build itself a bespoke Perl training solution from these modules at a fraction of the usual cost.
The vast majority of modules and their hands-on exercises are delivered in a quarter day. A few exceptional modules last a half day, because cross-dependencies in their content dictate a specific sequence of progress.
Please ring our training advisors for help in assembling a course with appropriate content, speed of progress, prerequisite knowledge, and consistent subject matter, etc.
- N.B. GBdirect write fully-bespoke courses for clients in all of our specialist areas of consultancy. If you have such a requirement and the budget for it, please contact our course developers for advice and support.
Listings of our Perl Modules
Preparing to Learn Perl
- About This Course
- What is Perl?
- Perl History
- Perl the Language
- Perl Programming Environment
- Running Perl Programs
- Running Perl Programs on Unix
- Running Perl Programs on Windows
- Very Basic Syntax
- Getting Perl to Help You
- A Sample Program
- Online Help
Perl: the Absolute Minimum
- Enough to Get Started
- A module designed for complete beginners
- The print Command
- Variables
- Scalars — Numbers and Strings
- Literal Numbers
- User Defined Constants
- Literal Strings
- Interpolation into Strings
- Assignment
- Truth in Perl
- Comparison Operators
- Conditional Tests
- Comparing Values
- A Popular Coding Error
- Smart Matching with ~~
- Alternative Tests
- Multiple Tests
- Switch Statements —
given/when - More on
given forLoopswhileLoopsunlessanduntiluse feature&use version #
Perl: Operators and Loops
- Concatenating Strings
- Fancy Assignment
- Assignment Shortcuts
- The Yada Yada Statement
- Autoincrement and Autodecrement
- Complex Conditions
- Short-Circuit Operators
- The Conditional Operator (Ternary Operator)
- Logical Defined-Or
// - Bitwise Operators
- Operator Precedence and Associativity; Sequence Points
- Operator Precedence and Associativity
- Undefined Values
- Overview of Flow Control
- Statement Modifiers
- Flow Control with
or - Flow Control with
and - More Loops
- Loop Control —
next&last - Example of
nextandlastStatement redoin loops
Perl: Beyond the Basics
- Quoting Mechanisms
- Disambiguating Interpolation
- Different Quote Symbols
q,qq,s///, andm//- Quoting Lists
- Quoting Really Big Strings
- Changing Between Case
- Splitting Strings into Lists
- Joining Elements of Lists
- Filtering Lists with
map - Combining
mapandjoin - Splitting, Mapping and Rejoining
- Using
mapto Initialise a Hash - The
sortFunction - Custom Sort Orders
- The
grepfunction - The Importance of Context
- Arrays in Different Contexts
- File Input in Different Contexts
- Difference Between
..&...Operators - Functions in Different Contexts
- Providing the Right Context
- Context Pitfalls
- Boolean Context
voidContext- Special Variables
- Examples of Special Variables
- More Special Variables
- Input and Output Special Variables
- Scope
- Localizing Special Variables
- Using Command-Line Arguments
- Options Processing
Arrays and Hashes
- Arrays and Hashes
- Lists
- Writing Lists
- Arrays — for Storing Lists
- Using Lists and Arrays
- Iterating Over Lists
- Using
foreach - The
pushFunction - Indexing into Arrays
- Hashes
- Fat comma and hashes
- Arrays: fat comma and hash initialising
- Accessing Elements of a Hash
- Hash Example
- Iterating Over Hashes
- Iterating Over Hashes — Example
- Size of Arrays and Hashes
Complex Data Structures & References
- Limits of Lists
- Nesting Arrays
- References in Arrays
- Dereferencing Array References
- Accessing a Particular Element of an Array Reference
- Arrays of Arrays
- The
Data::Dumper - Flexibility of Nesting Arrays
- Array References are Scalars
- Array Dereferencing Syntax
- Using the Arrow Operator
- Creating a Reference to a Named Array
- Passing Multiple Arrays to Functions
- Returning Multiple Arrays from Functions
- Hashes of Arrays
- Hash References
- Complex Data Structures
- Arrays of Hashes
- Hashes of Hashes
- Code References
- Invoking Code References
- Dispatch Tables
Perl: Input and Functions
- Simple Input
- Providing Standard Input
- Input Example
- Opening Files
- Reading and Writing Files
- Subroutines
- Subroutine Parameters
- Subroutine Parameters — Other Ways
- Calling Subroutines
- Calling Subroutines Without Arguments
- Returning Values from Subroutines
- Function Miscellany
- Persistent Variables
Advanced File Processing
- Opening Files
- File open modes
- Alternative File-Opening Syntaxes
- Predefined File Handles
- Redirection-Style File Opening
- Input and Output
- Controlling Output Formatting
- Controlling Input Formatting
- Reading Paragraphs
- Reading a Whole File
- Reading Fixed-Sized Blocks
- The Flip-Flop Operator
- Handling Binary Files
- Output from Multiple Processes
- Examining Directories
- Examining File Metadata
- File Test Operators
- Symbolic Links
- File Locks
- Locking Files with
flock
Text Manipulation with Regular Expressions
- Regular Expressions
- Other Metacharacters
- Regular Expression Examples
- Alternation and Grouping
- Built-in Character Classes
- Built-in Character Class Examples
- Matching Strings
- Matching the Default Variable
- Case-Sensitivity and Matching
- Capturing
- Regular Expression Examples
- Substitution
- Global Substitutions
Advanced Regular Expressions
- Summary of Using Regular Expressions
- Reminder of Regular Expression Syntax
- Different Quote Symbols Revision
- Quoting Lists Revision
q,qq,s///, andm//- Writing Regexps More Clearly
- Further Regexp Syntax
- Word Boundaries
- Grouping
- Line Boundaries
- Zero-Width Lookahead Assertions
- Lookbehind Assertions
- Any Character
- Alternation
- Grouping and Backreferences
- Capturing
- Optional Parts of Patterns
- Matching an Exact Number
- Non-Greedy Quantifiers
- Finding Multiple Matches
- Dynamically Making Replacement Text
Finding Out More for Yourself
- So Far
- Perl is Big
- Look Things Up
- Main Perl Documentation
- Perl Doc Taxonomy
- Functions
- FAQs
- Reading the FAQs
- Searching FAQs
- The Perl Cookbook
- Other Perl Books
- Perl Websites
- Knowing What to Look for
Debugging Perl
- Bugs
- Avoiding Bugs
- Perl's Built-in Debugger
- Debugger Documentation
- Using the Debugger
- Debugger Commands
- Advanced Debugger Commands
- Other Debugger Functionality
- Graphical Debugging
ptkdbDDD- Komodo
- Shunning the Debugger
- Using
warnfor Debugging CarpModule- Printing Nested Data Structures
- Using the Debugger as a Perl Shell
- Unix and Linux Specific Tools
- Run X-Windows on MS Windows for Perl on Unix/Linux
Command-Line Perl
- General Principles
- Quoting Command-Line Perl Programs
- Command-Line Perl
- Command-Line Perl Syntax
- Using Modules
- Using Perl as a Filter
- Looping Through Input with
-n - Transforming Input with
-p - Editing Files In-Place with
-i - Backing Up In-Place Edits
- Other Command-Line Flags
- Autosplit Mode
- Example: Locale-Aware Downcasing
- Example:
grepin Perl - Example: Unix-Epoch Times
- Example: Summing Input Lines
- Example: Selecting a Range of Lines
- Example: Find Emphasised HTML Words
- Example: Printing Unique Input Words
A Whistle-Stop Tour of the World of Perl
- Built-in Functions
- General String Manipulation
- Extracting Bits of Strings
- Changing the Case of Letters
- Converting Between Strings and Numbers
- Mathematical Operations
- Formatted Strings
- Handling Binary Data
- General List Manipulation
- Adding and Removing from Arrays
- File-System Functions
- Idiomatic Perl Programming
- Handy Tricks with Variables
- Removing Duplicates
- Formatting Text
- Sending Email
- Sending Email — Unix-Specific
Perl Style
- Style Issues
- Indentation
- Identifier Naming
- Naming Variables
- Naming Functions
- Global Variables
- Using
$_for Readability - High-Level Comments
- Low-Level Comments
- Parentheses
- Quoting
- Program Logic
- Structuring Data
- Modelling the World
- Object Orientation
- Style Resources
Handling Databases with Perl
- Interacting with SQL Databases Using Perl
- Using
DBI - Opening a Connection with
DBI - Example Query
- Running a Query
- Retrieving Records from
SELECT - Retrieving a Single Record
- Retrieving All the Records at Once
- Queries Which Don't Return Records
- SQL Injection Attacks
- Placeholders and Bind Values
- Two Last Notes
- Using ODBC
- Opening a Connection
- Executing Queries
- Fetching Records
- Reading Values from Records
- Other ODBC Methods
- Database Related Modules
- Tieing Hashes to Files
- Sample Database
System Interaction
- Connecting to Other Programs
- Unsafe Pipes
- Using
IO::Pipe - Grabbing a Programs Output
- Other Ways to Run Programs
Perl Security Issues
- Writing Secure Perl
- Taint Checking
- Using Taint Checking
- Dangerous Environment Variables
- Input from Files
- Set-User-ID Perl Programs
- Permissions and Users
Introduction to CGI Programming
- What is CGI?
- A Simple CGI Program
- Running CGI Programs on a Web Server
- Running CGI Programs on Apache
- Running CGI Programs on Microsofts IIS
- Web pages with User Input
- Form Submission & CGI Parameters
- Parsing CGI Parameters with
CGI::Lite - Using Here-Docs
- Queries Using the GET Method
- GET Query Syntax
- Limitations of the GET Method
- POST Queries
- Limitations of the POST Method
- HTML Forms
- Checkbox Controls
- Radio Button Controls
- Submit Button Controls
- Submit Image Controls
- Creating Hyperlinks
- URL Encoding
- Debugging CGI Programs
- Better Error Messages with
CGI::Carp - Displaying Messages in the Browser
- Running CGI Programs at the Command Line
- A Debugging Checklist for CGI Programs
- The
CGIModule
Further CGI Programming
- More CGI Issues
- Accessing HTTP Information
- HTTP Information About the Current Page
- Serving Non-HTML Content
- Generating Non-HTML Content
- Client Redirection
- HTTP Status Codes
- Status Codes with Redirection
- Sending Redirection Status Codes
- Maintaining State Across Requests
- Maintaining State with CGI Parameters
- Cookies
- Setting Cookies
- Parsing Cookies
- Using Cookies and CGI Parameters
- Session Handling
- Security of Session IDs
- Generating a Secure Session ID
- Propagating Session IDs
- Sessions Done Easily
- Example of Session Store
- File Upload Forms
- File Upload HTML
- Receiving Uploaded Files
- File Upload Denial-of-Service Issues
- Limitations of CGI
- Alternatives to CGI
Creating Web-Pages with HTML::Template
- Creating Web-Pages
- Using the
CGIModule to Produce Web-Pages - Embedding Perl in HTML
- Achieving Separation
- A Simple
HTML::TemplateTemplate - Advantages of
HTML::Template - HTML Character Entities
- Producing Lists
- Conditionals
- Complex Conditionals
- Nesting Structures
- Complex Loop Formatting
- Loop Context Variables
- Including Other Templates
- Deploying
HTML::Template - Flexibility of Using
HTML::Template - Flexibility of Loops
- Changing Templates Used with a Program
- Optional Parameters
- Permitting Optional Parameters
- Finding Out More
- Using
HTML::Template - One Final Point
Creating Web-Pages with HTML::Mason
- Why
HTML::Mason? - Configuring Apache
- Apache:
.masonFiles Only - Mason: Big Picture
- Mason: Concepts
- Escaping Values
- Conditional Values
- Scripted Values
- Formatting HTML
- Calling in Other Components
- Perl Code to Call in Components
- Named Blocks
<%perl>Blocks<%args>Blocks- Example
<%args>Block - Using the
<%args>Block - Component Arguments in
%ARGSand@_ - Component Arguments Via GET and POST
- Example Decoding Arguments Via GET and POST
<%once>Blocks<%init>Blocks<%cleanup>Blocks<%text>Blocks<%doc>Blocks<%flags>Blocks<%attr>Blocks- Autohandlers
- Autohandler Example
- Autohandlers for Initialisation
- Autohandler to Open a Database
- Dhandlers
- Finding and Executing a Dhandler
- Comments in Mason
Web Security Issues
- CGI Scripts and Security
- Putting User Input on the Web
- Guest Book Example
- Interpolation of Dangerous Strings
- Removing Special Characters
- Dangerous Strings as File names
- Unsafe Pipes
- Using
IO::Pipe - The Poisoned
NULCharacter - File Uploads
- Safe Communication with Databases
- Permissions for CGI Programs
Advanced Miscellany
- Advanced Miscellaneous Things
0 but true- Trapping Run-Time Errors
- Executing Code Fragments in Strings
- Secret Subroutines
- Static Variables
- Interpolating Expression Evaluation into Strings
- Pre-Sizing Array and Hash Variables
- Named Arguments to a Subroutine
- Named Arguments Example
- Coercing Subroutine Arguments
- Disadvantages of Prototypes
- Determining Argument Types
- Determining Return Types
- Slices of Array and Hashes
deleteing Array & Hash Elements- Benchmarking Portions of Code
- Magic Constants
Dates and Times
- Dates and Times in Perl
- Time Keeping Concepts
- Built-in Time Functions
- POSIX Functions
- The Time Zone
- The
DateTimeModules - Creation of
DateTimeObjects - Obtaining Dates
- Comparing Dates
- Adding Intervals to Dates
- Execution Time
Handling XML Data in Perl
- Xml as a Data Storage and Transfer Format
Xml::Simple- Reading an Xml File Back in
Xml::SimpleOptions- KeyAttr Example
- KeyAttr Result
XML::DOM- Reading in a CSV File
Using Perl Modules from CPAN
- Perl Modules
- Using Modules
- Standard Modules
- CPAN Modules
- Why Effective Perl Programmers are Efficient CPAN Users
- Finding Modules on CPAN
- Installing Modules
- The
cpanCommand - Finding Installed Modules
- Writing Perl Modules
- Perl Module Boilerplate
- Perl Module Boilerplate Explained
- Defining Functions in Modules
- Exporting Functions
- Exporting Functions - II
- Module Variables
- The
Exporter - Module Initialization
- Versions
PODPlain Old DocumentationFile::CopyFile::FindText::Wrap
Creating Classes and Objects
- Object-Oriented Perl
- Example Class Use
- Example Class Use: Explanation
- Example Class Implementation
- Class Implementation: Explanation
- Class Constructor Explanation
- Constructors
- What Defines a Constructor?
- Object Methods
- Implementing Object Methods
- Accessing Object Properties
- Interpolating Object Properties and Methods in Strings
- Class Names and File names
- Destructors
- Static Methods
- Dual-Purpose Class & Object Methods
- Inheriting from Other Classes
- Inheriting from Other Classes II
- Inheritance Details
- Singleton Objects
- Example Class:
CGI::Page CGI::PageImplementation- Using
CGI::Page CGI::PageClass DefinitionCGI::Page emitMethodCGI::Page cgiMethodCGI::PageSummary
Advanced Object Orientation
- Multiple Inheritance
- Method Lookup
- The
UNIVERSALBase Class - Autoloading Methods
- Accessor Methods
- Autoloading Accessor Methods
AUTOLOADCaveats- Method Lookup and
AUTOLOAD AUTOLOADfor Fast Startup- Automatic Loading of Modules
- Operator Overloading
- Which Operators to Overload
- Example:
MyTime - Cloning of Objects
- Connecting Methods to Operators
- Comparison Operator
- Tying Variables to Modules
- Making a
tie-Compatible Module - Tieing Hashes to Files
- Example: Caseless Hash
- Implementing Tie Modules
Managing Networks with Perl
- Network Name Services
- Network Name Services: the hosts File
- Parsing the hosts File
- NIS
- Querying NIS with
Net::NIS - Iterating Over NIS Maps with
Net::NIS - Caveats for
Net::NIS - DNS
- DNS Zone Files
- Automating Zone File Generation
- Using Perl to Generate Zone Files
- DNS Queries from Perl
- DNS Server Consistency Checking
- Deciding How to Make DNS Queries
- Using
nslookupto Make DNS Queries - Using
Net::DNSto Make DNS Queries - Directory Services
- WHOIS
- Making WHOIS Queries from Perl
- LDAP: Lightweight Directory Access Protocol
- An LDAP Query with Perl
- ADSI: Active Directory Service Interfaces
- ADSI from Perl with
Win32::OLE - Internet Mail
- Sending Mail
- Sending Mail:
sendmailon Unix - Sending Mail: MAPI on Windows
- Sending Mail: Choosing a Perl Module
- Sending Mail: Using
Mail::Mailer - Related Modules
Network Programming with Perl
- Objectives
- Berkeley Sockets
- Socket Domains and Types
- Addresses and Port Numbers
- Servers and Clients
- A Simple Client
- A Simple Client Explained
- Higher Level Socket Modules
- TCP Servers with
IO::Socket - TCP Server Explained
- UDP Clients and Servers
- Receive UDP Message
- UDP Explained
- Unix Domain Sockets
- Multi Client Servers - Forking
- Multi Client Servers - Forking Example
- Multi Client Servers - Select
- Multi Client Servers - Select Example
Net::FTP— File Transfer Protocol- LWP - Library for WWW in Perl
- LWP - Automatic Form Filling
Logging with Perl
- Logging with Perl
- Uses of Logs
- Analyzing Logs
- Parsing Text Logs
- Web Access Logs
- Extended Common Log Format
- Reading
utmpFiles - Example of Using
User::Utmp - Reading Windows Event Logs
- Writing Logs
- Example Logging Function
- Using Unix syslog
- Using
Sys::Syslog - Rotating Log Files
- Logging with a Database
- Logging Related Modules
Managing Users and Processes with Perl
- User Identity Concepts
- User Information Under Unix
- Unix User Information from Perl: Lookup
- Unix User Information from Perl: Iteration
- Unix Group Information from Perl
- Unix User Information: Another Way
- User Information Under Windows
- User Groups Under Windows
- Windows User Information from Perl
- User Info from Win32::AdminMisc
- Changing User Information
- Process Control
- Unix Process Concepts
- Process Information Under Unix
- Using
Proc::ProcessTable - Windows Process Concepts
- Process Handles
- Scheduling Events
- Filesystem Quotas
- Monitoring User Activity: Unix
- Monitoring User Activity: Windows
- Modules for Users and Processes
- Modules for Filesystems
Using Perl for Securing Your System
- Spotting Unexpected Activity
- Detecting Attempts to Guess Passwords
- Searching for Suspicious Files
- Example of Finding Suspicious Files
- Detecting Changes in Important Files
- Making MD5 Checksums
- Example of Checking Files
- Using SNMP
- General Advice
- Existing Security Tools
- Security Related
References
- Interesting Web Links
