Perl Programming


LiveFire Labs' Perl Programming course is an in-depth study of the fundamental concepts for developing and maintaining programs using the Perl programming language. The course also covers a few advanced topics such as forking processes and trapping signals.

Hands-on lab exercises are used to reinforce key concepts, and are completed by logging in on a real server in our Internet Lab from your work or home computer.

  1. Lab System Connectivity
  2. Perl Data
  3. Control Structures
  4. Lists and Arrays
  5. Subroutines
  6. Hashes
  7. Input and Output
  8. Regular Expressions
  9. Filehandles
  10. Working with Files and Directories
  11. How to work with Processes
  12. Substrings

Lab System Connectivity
Module Overview: If you have already taken a LiveFire Labs' course and know how to connect and log in to a system in the Internet Lab, you may safely skip this module. If this is your first course with LiveFire Labs, it is advised that you read through this module and perform the "Getting Connected and Logging in" hands-on exercise prior to starting the Perl modules.
- Using SSH to Connect
- The Login and Password Prompts

Perl Data
Module Overview: This module introduces the various data types used in the Perl language. Since Perl handles data types a little differently than other languages this module is rather lengthy but is necessary to understand in order to build upon the concepts taught here.
- Scalar Data, Strings, String Operators
- Scalars (Numbers)
- Scalar Variables
- Operator Precedence and Associativity
- Keyboard Input and Output to the Monitor

Control Structures
Module Overview: Control structures are one of the capabilities that give Perl its flexibility and power. This module takes a look at the wide variety of control structures available to the Perl programmer.
- What is a Control Structure?
- unless and while
- Autoincrement and Autodecrement
- for and until
- Expression Modifiers, Naked Blocks, and Loop Controls
- Logical Operators and The Ternary Operator

Lists and Arrays
Module Overview: So far we have only discussed scalar data - which is when a single value is assigned to a variable. Most programming languages have some method to access multiple values stored via a single variable. In Perl, an array is a single variable containing a list; the list is the actual data.
- Access to Array Elements
- List Literals
- Array Operators
- The reverse and sort Operators

Perl Subroutines
Module Overview: We can write user functions (called subroutines) in Perl, which allows us to add our own unique processing and include it in our Perl programs. For instance...if there is a section of code that appears multiple times throughout the program it would be more efficient to take that code and place it in a subroutine so that it actually only appears once. This provides for cleaner code that is easier to maintain since any changes only need to be made in one place. This module describes how to write and use your own subroutines.
- System Functions vs. User Subroutines
- Subroutine Arguments
- Private Variables

Perl and Hashes
Module Overview: The hash is an incredibly powerful concept that has been incorporated into Perl. Once it is understood, programmers find many ways to use it in their code.
- What is a Hash?
- Accessing Hash Elements
- Hash Functions

Input/Output in Perl
Module Overview: A programming language is not very useful if it cannot read input or display output. You have already seen some examples of how Perl accepts input and displays output, and in this module we will look at this functionality in more detail.
- Using Standard Input
- Standard Output
- Printing with printf

Regular Expressions in Perl
Module Overview: As we have already seen, Perl incorporates many features that are found in other programming languages. The power that makes Perl such a popular language is found in regular expressions, one of the language's most important features.
- What are "regular expressions"?
- About Patterns (Part I)
- About Patterns (Part II)
- More on Matching Regular Expressions
- Substitutions Using Patterns
- Split and Join Operators

Using Filehandles in Perl
Module Overview: Filehandles are important in that they allow Perl programs to access files for reading and writing. So far input and output has been from the keyboard and to the monitor, or via the diamond operator. This module starts to add disk input and output capabilities to your Perl programming repertoire.
- What is a Filehandle?
- Leftovers for Filehandles
- File Tests in Perl

Working with Files and Directories
Module Overview: Being the powerful language that it is, Perl provides a rich set of tools to work with directories and files. This allows Perl programs to work with files anywhere on the system - within the normal restrictions placed on each file by operating system access controls.
- Working with Directories
- Removing, Renaming, Linking Files
- Creating and Deleting Directories
- Modifying File Properties

How To Work With Processes
Module Overview: Processes are other system tasks that are running or that you can actually run from within your Perl code. Every script or executable program, and anything else that runs under Unix is a process. Each process is assigned a unique number so that the operating system can keep track of it and the resources it uses. Being able to control processes and obtain information from other programs and scripts provides a wealth of tools so you don't have to write them all yourself.
- The "system" and "exec" Functions
- Accessing Environment Variables
- Using fork in Perl
- Working with Signals

Working With Substrings
Module Overview: One of Perl's strengths is working with string data. Therefore it only makes sense to address some additional string processing techniques, besides regular expressions.
- Substrings and the index Function
- Using "substr"


Completion of our UNIX and Linux Operating System Fundamentals course, or an understanding of the concepts covered in that course is required.

Course Duration

You will have access to the online course content and Internet Lab system for 8 weeks (24/7). This initial access period can be extended (with NO additional fee) if you need more time to complete the course.

Course / Lab Support

Your "Getting Started" email will contain the name and email address of your assigned LiveFire Labs training specialist, who will check in with you shortly after you start the course to find out how things are going and to see if you have any questions. You can also email your training specialist, who is an experienced UNIX technologist, whenever you have questions about the course material or hands-on lab exercises.

Getting Started

Follow the registration steps below if you are ready to learn how to program with Perl, or contact us with any questions you may have. You can optionally check our FAQ for answers to common questions or view our Testimonials page to read what previous students think about our online courses and Internet Lab.