Course 580:
Introduction to Perl Programming

(3 days)

 

Course Description

This is a fast-paced course for those who must become productive in Perl. Attendees learn the best methods of working with Perl’s functions and operators, how to build understandable programs using Perl functions, how to use packages and Perl’s OO techniques, how to find and use packages to quickly program complex subjects, how to use arrays and hashes to organize data, and how to read and write from files. Attendees complete workshops using either a Microsoft OS or Linux.

Learning Objectives

  • Be able to create scripts to manipulate data
  • Read and write from a file
  • Read a directory
  • Effectively use lists, arrays, and hashes
  • Understand scope and references
  • Build subroutines
  • Use regular expressions to extract data and do string manipulation
  • Be able to use packages
  • Be able to use Perl’s OO programming

Who Should Attend

This course is valuable for UNIX, Linux, and Windows administrators, software engineers, programmers, and power users who want to become productive in the Perl programming language.

Prerequisites

Some programming background is useful but not absolutely necessary. Experience with a text editor and knowledge of how to manipulate files is also helpful.


Course Outline

Getting Started

  • A Minimal Program
  • Scalar Variables
  • Quotes
  • Reading in Lines
  • Looping: while
  • Programming Aid

Scalars

  • Scalar Variable Review
  • Scalar Operators
  • Manipulating Numbers
  • Manipulating Strings

Program Structure

  • if and unless Statements
  • while and until Statements
  • for Statements
  • Labels, goto, last, and next
  • Statement Modifiers
  • do Statements and Expressions

Lists

  • Definition of a List
  • Working with Lists
  • foreeach and map
  • Context: List, Scalar, Boolean, and Void
  • Functions Returning a List

Arrays and Hashes

  • Array Basics
  • Positional Variables
  • push, pop, shift, unshift
  • sort, split, join
  • Hash Basics
  • Hash Manipulation

Regular Expressions

  • The m Operator
  • Definitions and pl
  • Basic Regular Expressions
  • Subexpressions
  • More on m
  • Substitution Command

Subroutines

  • Subroutine Basics
  • References
  • Scope

I/O

  • Review
  • Working with a File

Modules and Packages

  • Perl Documentation
  • Using a Module
  • Working with OO Packages

Please Contact Your ROI Representative to Discuss Course Tailoring!