Duration:

4 days

Audience:

Employees of federal, state and local governments; and businesses working with the government.

Course Overview:

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.

Course Outline:

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 $_