Intermediate Perl

Course Description

This course takes people who use Perl a little and turns them into Perl programmers. Building on the foundations of our Introduction to Perl course it will take your Perl programming ability to the next level. This course will enable you to use Perl to tackle just about any problem.

The course can be run over one day in lecture style or over two days including practical exercises.

Intended Audience

This course will be useful to anyone who has used Perl occasionally, but who now wants to improve their knowledge of Perl in order to become a competent Perl programmer. In order to get the most out of this course, you should be comfortable writing simple Perl programs using loops, subroutines and CPAN modules. Our Introduction to Perl course provides an ideal background for this course, but we recommend a couple of months of using the skills learned from that course before attending this one.

Key Skills

After attending this course you will be able to:

Course Outline

  1. Types of Variable
    1. Lexical and package variables
    2. Packages
    3. “local” variables
  2. Strict and Warnings
    • The coding safety net
    • use strict
    • use warnings
  3. References
    • What is a reference?
    • Creating references
    • Using references
    • Parameter passing
    • Complex data structures
  4. Sorting
    • The sort function
    • Sorting blocks and subroutines
    • More rfficient sorts
  5. Reusable Code
    • Why write modules?
    • A basic module
    • How modules work
    • Exporter.pm
  6. Object Orientation
    • What is object orientation?
    • A simple object in Perl
    • A brief introduction to Moose
  7. Testing
    • Why test code?
    • Testing in Perl
    • Perl’s standard testing framework
    • The Test Anything Protocol
    • Other testing modules
  8. Dates and Times
    • Perl’s built-in date and time handling
    • Date and time modules on CPAN
    • Using DateTime.pm and friends
  9. Templates
    • Why use templates?
    • DIY templating
    • Templating on CPAN
    • The Template Toolkit
    • The template equation
    • Simple example
  10. Databases
    • Why use databases?
    • Introduction to DBI.pm
    • Inserting, selecting, updating and deleting data
    • Some efficiency considerations
    • Introduction to Object Relational Mapping
  11. Further Information
    • Books
    • Web sites
    • Mailing lists
    • The Perl community

Course Instructor

This course will be run by Dave Cross.