Advanced Perl Programming

COURSE OUTLINE:

Description

In this course, you will explore next-level Perl capabilities and features such as parsing text and using shortcuts and references. You also will learn how to use CPAN to access the Perl library. You will leave this course armed with the skills you need to handle advanced Perl development and scripting tasks.

Audience

Programmers who want to leverage their basic Perl knowledge into production-quality tools

Prerequisites

  • A solid development experience in any programming language
  • A working, user-level knowledge of UNIX/Linux, Mac, or Windows

Learning Objectives

  • Create efficient data structures using references
  • Understand advanced text parsing techniques
  • Access data from relational database systems
  • Create reusable modules
  • Design and use objects
  • Create TCP/IP clients and servers

1. Reference Refresher

  • Creating references
  • Anonymous arrays and hashes
  • Dereferencing
  • References and subroutines
  • References and arrays
  • Complex data structures

2. Data Wrangling

  • Reading text files
  • Creative use of <> and $/
  • Matching and substituting
  • RE review
  • Using backreferences
  • Parsing lines
  • Using here documents and __END__
  • Converting data with pack/unpack

3. Shortcuts and Defaults

  • The ubiquitous $_
  • How to use <>
  • Pattern matching in brief
  • File tests on _
  • One-liners

4. Modern Perl

  • Features added since 5.0
  • Higher-order functions
  • Say()
  • Switch statement (given/when)
  • Smart matching
  • Defined-or
  • State variables
  • Lexical $_