3 Day – Introductory Perl Programming

[wpfilebase tag=file id=65  tpl=pdf/]

This course is a 3 day introduction to Perl programming. It is aimed at programmers wanting to learn Perl syntax, data types, subroutines and standard libraries with the intention of developing or maintaining small programs and scripts. The focus is on using best practices and techniques to develop professional quality software.

Prerequisites

This course is designed for programmers with practical experience of using at least one other programming or scripting language: no prior knowledge of Perl is assumed.

Learning Objectives

The course will help developers understand the basic principles of writing Perl programs, specifically how to:

  • Use scalar variables and expressions
  • Store data in arrays, lists & hashes
  • Work with flow control structures
  • Write basic regular expressions with text substitution
  • Work with File I/O
  • Run external processes

Delivery

This course comprises a mix of theory, demonstrations and hands on exercises. Approximately 50% of the time is hands-on.

Day 1 – Expressions & Flow Control

  • Executing Perl programs
  • Strict mode and warnings
  • String variables, literals and interpolation
  • Console I/O
  • Numeric Operators and functions
  • String operators and functions
  • Data conversion
  • If statement
  • List definitions
  • Array variables
  • While and for statements

Day 2 – Lists, Arrays & Hashes

  • I/O File handles
  • Standard I/O streams
  • Here documents
  • Reading and writing files
  • File system manipulation
  • List operations
  • Switch statement
  • Last and next statements
  • Statement modifiers
  • Code blocks
  • Hashes and hash operations

Day 3 – Data Processing

  • Regular Expression pattern matching
  • Pattern wildcards
  • Text substitution Array and hash slices
  • Sorting lists
  • Grep function
  • Subroutine definitions
  • Passing arguments
  • Return values
  • Using libraries
  • Global and local variables
  • The ARGV variables
  • External processes

Process pipelines