PERL Part 1 - BASICS

Course:  PERL1
Duration:  4 Days
Level:  I
Course Summary

Perl is a mature, extremely flexible, general purpose language, which is especially well suited to textual manipulation. In addition to its comprehensive built-in facilities, there are a large number of freely accessible libraries of Perl code to help build a wide range of applications. And it is available free-of-charge.

PERL Part 1 - BASICS provides delegates with the knowledge and skills necessary to develop scalable cross platform applications using the Perl programming language. This course teaches the basic concepts and capabilities of the Perl program scripting language.

Upon completion, delegates will be able to use Perl to perform data processing tasks, file and directory management, and some system administration tasks.

In line with the cross-platform nature of the Perl language, this highly-practical course can be presented on either a Windows or UNIX/Linux platform, and the course is applicable to many other platforms as well.

« Hide The Details
Topics Covered In This Course

Background, rationale and purpose of Perl

  • What is Perl?
  • Benefits and Concerns for Perl
  • CPAN
  • Installing Perl
  • Perl Program Concepts
  • Simple Perl Programs Explained
  • Compiling and Executing Perl Programs
  • Documentation with perldoc
  • Lab: Writing and testing simple Perl programs

Scalar Data, variables and operators

  • Number literals and operators
  • String literals and operators
  • Automatic conversion
  • Working with Scalar Variables
  • The use strict Pragma
  • Variable Interpolation
  • Operator Precedence and Associativity
  • AutoIncrement and AutoDecrement
  • Input with <STDIN>
  • chomp()
  • Lab: Writing interactive programs

Formatting and Printing

  • Output with print()
  • Formatted output with printf()
  • Lab: Formatted output using Perl

Control structures

  • Blocks
  • if condition
  • else clause
  • nested if conditions
  • unless condition
  • elsif clause
  • Ternary Operator?
  • Boolean values
  • Logical Operators
  • while iteration
  • until iteration 
  • undef and defined
  • for
  • last, next and redo
  • Labelled Blocks
  • Logical Operators
  • Short-circuit Operation
  • Lab: Writing simple Perl programs using conditions and iterations

Lists and Arrays

  • List Concepts
  • List Literals
  • qw
  • foreach and $_
  • List assignment
  • Array Concepts
  • Array Assignment
  • Array Element Assignment
  • Special Array Indexes
  • push() and pop()
  • shift() and unshift()
  • sort() and reverse()
  • Context
  • Lab: Writing Perl programs to manipulate lists and arrays

Functions

  • Modular Programming
  • Function concepts
  • Creating a subroutine
  • Calling a subroutine
  • Subroutine arguments
  • Returning a value.
  • my vs local
  • Variable Length Parameter Lists
  • Lab: Developing modular programs in Perl

Hashes

  • Hash Concepts
  • Assigning values to a Hash
  • Accessing a Hash
  • keys() and values()
  • each() and exists()
  • delete()
  • Lab: Using Hashes to manage data

Debugging Perl Scripts

  • Debugging Concepts
  • The Perl Debugger
  • Using the Debugging Commands
  • Lab: Debugging Perl Programs

Input/Output

  • Input/Output Concepts
  • Using <STDIN>
  • Using <>
  • Using @ARGV
  • Processing <STDERR>
  • Lab:  Perl problems using further input and output

Pattern matching with Regular expressions

  • Patterns Concepts
  • Metacharacters
  • Character Classes
  • Quantifiers
  • Anchors
  • Memory Parentheses
  • Precedence
  • Matches with m//
  • Option modifiers
  • Binding Operator =~
  • Interpolating into Patterns
  • Match Variables
  • Matches with s///
  • split() and join()
  • Lab: Searching/Replacing text using Regular expressions

Files and Directories

  • File Organization
  • Filehandle Concepts
  • Opening files
  • warn and die
  • Reading and writing files
  • File Tests
  • Globbing()
  • Closing Files
  • unlink and rename
  • Opening Directories
  • Working with Directories
  • Closing Directories
  • chdir, mkdir, rmdir
  • stat() and lstat()
  • localtime()
  • link and symlink
  • chmod, chown, utime
  • Lab: Manipulating Files and Directories

Process Management

  • system()
  • Environment Variables
  • Backquotes (``)
  • Processes as FileHandles
  • fork() and exec()
  • Sending and Receiving Signals
  • Lab: Working with Processes
What You Can Expect
  • Specify the features and uses of Perl.
  • Describe and use literals and variables.
  • Use Perl arrays and associative memory.
  • Describe and use programming control structures.
  • List and use operators.
  • Format and print program output.
  • Perform basic file manipulation.
  • Access and manipulate directory information.
  • Create and use functions.
  • Describe and use regular expression characters.
  • User Perl to perform Unix-like operations.
Who Should Take This Course

This course is valuable for technical users, application programmers, and system programmers.

Recommended Prerequisites

Delegates should have basic user level knowledge of an operating system such as Unix or Windows. Any programming experience would be an advantage.

Training Style

Hands-on, Instructor-Led.

« Hide The Details
Related Courses
Code Course Title Duration Level
SHELL
UNIX Shell Programming
3 Days
II
Details
PP2BTB
PERL Part II - Beyond The Basics
4 Days
II
Details

Every student attending a Verhoef Training class will receive a certificate good for $100 toward their next public class taken within a year.

You can also buy "Verhoef Vouchers" to get a discounted rate for a single student in any of our public or web-based classes. Contact your account manager or our sales office for details.

Schedule For This Course
There are currently no public sessions scheduled for this course. We can schedule a private class for your organization just a couple of weeks from now. Or we can let you know the next time we do schedule a public session.
Notify me the next time this course is confirmed!
Can't find the course you want?
Call us at 800.533.3893, or
email us at [email protected]