Perl Programming Course



Course Details:

Length: 3 days

Price: Private Group Training Only

Group Price: Request Quote

Training Reviews

Course Features:

Live Instructor Teaching

Certificate of Completion

Digital Badge

Courseware: Print

Free 6 Month Online Retake

Hands-On Learning?: Yes

Software Lab Included?: Yes

Delivery Methods:

Live Online

Individuals and Groups
@ Your Location

Onsite for Teams

Group Teams
@ Your Organization

This is an instructor-led course. It is taught by an instructor live online or at organizations for groups.
For team training, we can teach onsite at your office or private live online.

 

Course Overview

If you're just getting started with Perl, this is the course you want—whether you're a programmer, system administrator, or web hacker. Perl is suitable for almost any task on almost any platform, from short fixes to complete web applications. Perl teaches you the basics and shows you how to write programs up to 128 lines long—roughly the size of 90% of the Perl programs in use today.


Register Early: Registration Deadline is 2 Weeks Prior to Class Start.


Course Topics



Course FAQs

What Are the Available Class Formats?

This course is taught by a live instructor and is available in two class formats:

  1. Live Online for Individuals
  2. Onsite/Online for Private Groups

What Is Perl?

Perl is a well-established and versatile general-purpose scripting language. It was initially developed by Larry Wall in 1987 and has since become one of the most popular programming languages for web development, system administration, network programming, GUI development, and more. Perl’s popularity is due to its portability, reliability, and ease of use. It is widely used in the business world for automating tasks and simplifying complex operations.

With its extensive library of modules and comprehensive support for many platforms, Perl has become an invaluable tool for developers of all backgrounds. Its stability and scalability are ideal for businesses that require a reliable language to develop solutions quickly and efficiently. Whether you’re building applications, managing databases, or creating web services, Perl provides you with the power and flexibility to get the job done.

What Is Perl Scalar Data?

Perl scalar data is the most fundamental type of data that a Perl programmer deals with. It consists of numbers, strings, and built-in warnings generated by the language itself. Scalar variables are used to store and manipulate these pieces of data.

The print statement can be used to output scalar data to a console or file. The if control structure is a powerful tool for controlling the flow of a program based on certain conditions. This can be done using comparison and logic operators such as <, >, ==, != etc... Input from the user can be acquired with the use of the gets function; this data should then be sanitized with chomp to remove trailing newlines.

The while control structure is often used in conjunction with the if statement, allowing you to loop over a set of instructions until a certain condition is met. The undef value can be used when declaring variables as an alternative to "null" or "nil". The defined function can then be used to check if that variable has been assigned a value or not.

By mastering the basics of Perl scalar data, you can take your programming to the next level and write more sophisticated Perl scripts.

What Are Perl Lists and Arrays?

Perl lists and arrays are an important part of the language. They allow you to store multiple pieces of data in one variable, which makes it easier to work with larger datasets. Lists and arrays can be used for many things, including looping through a set of values, accessing elements within an array, creating list literals, interpolating arrays into strings, and using the foreach control structure.

When accessing elements of an array, you can use either a number or a name to refer to the element. Numbers start at 0, while names are typically strings that refer to some type of value or object within the array. Special array indices such as $#array_name can be used to access the last element in an array, while $array_name can be used to access the current element.

List literals are one way of assigning values to a list or array. This is done by enclosing the list elements within parentheses and separating each item with a comma. List assignment is another way of assigning values, which involves assigning the output of an expression to a list or array.

Arrays can also be interpolated into strings, which means that each element of the array is automatically inserted into the string wherever it appears. This makes it easy to quickly create a string from a set of elements in an array. The foreach control structure is used when looping through each element of an array. It allows you to execute a set of commands on each element in the array, making it easier to process large collections of data.

Perl also has different contexts for scalar and list values. Scalar context refers to working with individual values while list context is used when dealing with a list or array. The command is used to read user input in list context, which can be used to allow users to enter multiple values at once.

Lists and arrays are a powerful part of the Perl language that makes it easy to store and manipulate data. With these tools, you can access individual elements, create literals, interpolate arrays into strings, and use the foreach control structure to loop through values.

What Are Perl Subroutines?

Perl subroutines are user-defined functions that can be used to perform a specific task. They can be invoked multiple times within a program and can accept input values, known as arguments, which are used to customize the behavior of the subroutine.

To define a subroutine in Perl, use the keyword 'sub' followed by a subroutine name and open braces. The subroutine code should be placed between the braces, and then the keyword 'return;' should be used to return any values from the subroutine.

Subroutines can also take arguments, which are specified in parentheses following the subroutine name. These arguments can be used to customize the behavior of the subroutine.

Private variables, declared with 'my', will also persist throughout the life of a subroutine, even if it is called multiple times in a program. This enables developers to keep track of various states within their applications.

Perl supports variable-length parameter lists which allow developers to define a subroutine that can accept any number of arguments. This enables developers to create more flexible programs with fewer lines of code.

To ensure that the code in a subroutine is running correctly, it is recommended to use the 'use strict' pragma at the beginning of each subroutine. This will give the developer more control over how their code is interpreted, and help them catch any errors before they propagate further into the application.

Perl subroutines are an essential tool for developers who want to create robust and maintainable applications. By leveraging their capability to accept arguments, use private variables, and have variable-length parameter lists, developers can create powerful and versatile applications with relative ease.

What Is Perl Input and Output?

Perl allows you to read input from standard input (STDIN), the diamond operator (<>), and invocation arguments ($ARGV). You can also write output to standard output (STDOUT) and files, with formatted output using printf.

Filehandles are Perl objects that act like a bridge between your script and an external resource, such as a file. You can open a filehandle and then you will be able to read from or write data to the external resource. If there is an error, such as if you try to open a file that does not exist, you can use the die function to raise a fatal error.

You can use say instead of print to automatically add a newline character to the end of output. You can also store filehandles in scalar variables, allowing you to refer back to them later and open files with different permissions or write data to them from multiple places in your code.

You can reopen any standard filehandle that has been reset by Perl, such as STDOUT, to write data to a different file or location. This makes it easy for you to switch between different output locations within your script.

Perl provides various ways of reading input and writing output that is easy to learn and use. With the use of filehandles and say, you can control where data comes from and where it goes, giving you the flexibility to create powerful scripts that interact with other external resources.

What Are Perl Hashes?

Perl hashes are data structures used to store and retrieve information. They consist of an associative array with a key-value pair for each element. Hashes are used in many programming languages, including Perl, Python, Ruby, and JavaScript.

Hash elements can be accessed using their keys. Keys must be unique and can take on a variety of forms, including strings, numbers, and even references. Values can be anything from a simple scalar value to more complex data structures like arrays or hashes.

Hash functions are built-in Perl functions that allow the programmer to manipulate hashes quickly and efficiently. These functions include ‘keys’, ‘values’, and ‘each’. They can be used to iterate over elements, add and remove elements from the hash, test for equality, or check if a key exists in the hash.

Hashes are commonly used in programs to store configuration settings, user data, and preferences. They provide an efficient way to access frequently used pieces of data without having to search through a large list or array.

The %ENV hash is a special type of Perl hash that stores environment variables. These are variables that are set by the shell and can be used throughout the program to access information about the user’s system, such as the current directory, username, and more. Accessing this hash provides a convenient way to access system information without having to call external programs or functions.

Hashes are an essential part of programming in Perl and many other languages. They provide a powerful way to store and efficiently access data, making them invaluable for any programmer looking to write efficient code.

What Are Regular Expressions in Perl?

Regular expressions in Perl are a powerful tool used to match patterns within text. Regular expressions (or regex) provide a way to search for specific strings of characters, such as words or phrases, within larger blocks of text. They can be used to find and replace textual elements, validate user input, format data, and even extract desired content from more complex strings.

Regex can easily become complex, but basic regular expressions are quite simple. The most basic use of regex involves creating a pattern that represents the characters you’d like to match. For example, searching for ‘cat’ will return any instance of the word cat in the text. This type of pattern is known as a literal, since it’s exactly what you type in.

You can also use character classes to match multiple characters at once. Character classes are defined by square brackets and any character within the brackets will be matched. For example, searching for ‘c?t’ will return both ‘cat’ and ‘cot’. You can also use the hyphen character (-) to define a range of characters, such as ‘c-[aei]t’ which will match ‘cat’, ‘cit’, and ‘cot’.

The use of regular expressions in Perl is an effective way to quickly process and manipulate text. Using the right pattern, you can easily extract specific information from longer strings of text or use it to search for and replace elements in larger documents. Regular expressions are a valuable tool for anyone working with large amounts of data.

What Is Matching with Regular Expressions in Perl?

Matching with regular expressions in Perl is done using the m// operator, which stands for “match”. This operator uses a pattern to search through text or strings of characters and determine if it matches. The results are then stored in predefined variables that can be used for further processing. Modifiers are available to change the way m// works, such as allowing case-insensitive matching or global searches.

Anchors are used to identify specific positions within a string, such as the beginning or end of a line or word boundary. The binding operator =~ is used to specify which pattern should be applied to the string and can take regular expression parameters.

Interpolating into patterns is also possible with Perl. If a variable is used in the pattern, it will be interpolated as if the contents of the variable were part of the pattern itself. The results of the match can then be stored in special variables such as $& and $1 or other capture groups for further processing.

General quantifiers are used to define the number of characters that should be matched. For example, a plus sign (+) can indicate that one or more characters should match, while an asterisk (*) can mean any number of occurrences up to infinity. Precedence is also important in regular expressions as parentheses and other special symbols are used to set different levels of precedence. Understanding how precedence works can be crucial for creating complex patterns.

With the proper understanding of these concepts, Perl's powerful matching capabilities can be leveraged to great effect. From simple string searches to complex pattern matching, Perl offers a wide range of options for working with regular expressions. Taking advantage of these features can create efficient and effective solutions for text processing.

What Are Perl Control Structures?

Perl control structures are blocks of code that can be used to make decisions, loop through data, or execute a set of instructions. They can help increase the efficiency of a program by allowing it to repeat tasks and make decisions based on user input or other criteria.

One example of a control structure is the unless control structure. This control structure works like an “if...not” statement. If the condition is false, then its instructions will execute; if it is true, then nothing happens. The until control structure works similarly but in reverse – it looks for a condition to be true before executing the code inside of it.

Expression modifiers are similar to control structures but they are a single statement, usually written after the code that is being tested. They can be used to create shortcuts when coding or to test conditions more succinctly.

The naked block control structure allows multiple statements to be grouped and treated as one statement. This is helpful when writing complex logic and avoiding nested if/else statements.

The elsif clause is used in combination with the if/else statement and allows for multiple conditions to be tested without getting too tangled up in the if/else logic.

Autoincrement and Autodecrement are operators which increment or decrement a value by one each time they are used. They are often used in for loops when looping through a set of values.

The for control structure is the simplest way to loop through data. It takes an initialization statement, a condition, and then an increment or decrement statement that changes the condition after each loop until it no longer evaluates as true.

Loop controls can be used to control how a loop behaves. They can be used to break out of a loop or skip the remainder of the loop and continue at the top again.

The conditional operator ?: is a ternary operator which takes three expressions and evaluates a condition based on them. This operator can be used as an alternative to if/else statements for a more compact way of writing logic.

Logical operators are used to create logic from two or more conditions. They allow the programmer to combine multiple expressions and test against them as one statement. Some common logical operators include AND, OR, and XOR.

By understanding these control structures, it is possible to write well-structured programs in Perl that are both efficient and effective. These control structures can be used to increase the efficiency of a program and make the code more concise. With the proper use of these control structures, one can create powerful programs that are sure to stand the test of time.

What Are Perl Modules?

Perl modules are packages written in the Perl programming language that allows you to use predefined functions and objects. These can be used to simplify tasks and speed up development time by reusing existing code.

Finding modules is made easy by a variety of online resources such as CPAN, Comprehensive Perl Archive Network. This platform hosts thousands of useful modules and provides detailed descriptions of their uses.

Installing modules is done using the CPAN shell, which is a command-line utility for managing downloaded files. This can be accessed through the terminal or by running a script to download and install modules on your computer.

Using simple modules is easy. Just include the relevant code in your program and you can reference the functions or objects that the module provides. For example, if you need to access a database in your program, you could use an existing module rather than writing all of the code yourself. This saves time and energy while ensuring that your code is accurate and up-to-date.

Perl modules let you access powerful tools and existing code for a variety of tasks. This means that you can focus on writing your program rather than reinventing the wheel. With the right modules, complex tasks can be simplified and development time shortened.

What Are Perl File Tests?

Perl File Tests allow users to check and compare the attributes of a file. To perform these tests, several built-in functions such as stat, lstat, and localtime are used in conjunction with bitwise operators.

The stat function returns an array with information regarding the attributes of a file, such as its size, type, and permissions. The lstat function returns the same information but when a symbolic link is encountered instead of returning the attributes of the file linked to it, it gives details about the link itself.

The localtime function can be used to convert a timestamp into an array consisting of 9 elements that represent the day, month, year, and other components of the date.

To compare the attributes of two or more files, bitwise operators such as &, | and ! can be used to evaluate logical expressions containing numerical values representing the attributes of a file. For example, if you wanted to check whether two files have identical permissions, you could use & operator on the respective permission values.

Perl File Tests allow users to check and compare the attributes of a file, enabling users to perform tasks such as determining whether a file is executable or if it has been modified in any way. As a result, they are essential for managing files on a system efficiently.

What Are Perl Directory Operations?

Directory operations in Perl provide mechanisms to assist with navigating, manipulating, and querying the file system. Using these functions, you can move around the directory tree quickly and easily, search for files using globbing techniques, read and write to files in subdirectories recursively, create links between files and directories, and modify permissions or ownership of items in the directory tree.

The core functions available in Perl for directory operations allow you to move around the file system and search for files using globbing. Globbing uses wildcards and pattern matching to quickly find a set of files that match a particular string or pattern. It can also be used with an alternate syntax that makes it easier to search for different types of files.

You can also use directory handles to read and write to files in subdirectories recursively, which makes it easy to process a large set of directories with one command. Additionally, you can manipulate the files and directories in the tree, including removing items or renaming them. You can even create links between files and directories, allowing you to access them from multiple areas of the tree.

You can use Perl directory operations to modify permissions or ownership of items in the directory tree. You can also change the timestamps on any item in the directory tree to a specific date and time. With these functions, it is possible to write powerful scripts to automate common tasks and maintain the directory tree in an organized way. You can use these functions to ensure that permissions are properly set on all items in the system, and take appropriate action if they are not.

Perl provides a comprehensive suite of tools for manipulating the file system and maintaining its integrity. With the right combination of functions, you can quickly and easily perform complex directory operations to ensure that your system is organized and secure. Using Perl’s powerful capabilities, you can maintain a healthy directory tree with minimal effort.

What Are Perl Strings and Sorting?

Perl is a powerful programming language that allows for some complex sorting options. The sort function can be used to rearrange elements within an array according to various criteria, such as numerical order or alphabetical order. Strings are sequences of characters and the basic operations in Perl include manipulating strings and sorting them.

The index() command is used to locate a substring within a larger string. It returns the position of the first occurrence of the substring, or -1 if it is not found. The substr() command can be used to manipulate strings by extracting part of an existing string and then replacing it with another string.

The sprintf() command formats data into different forms. It takes data from a list, formats it according to various criteria, and outputs the formatted string. For example, sprintf() can be used to create output strings for dates or monetary values with consistent formatting.

Advanced sorting techniques in Perl include using custom comparison functions. These functions allow more flexibility in arranging elements within an array by taking into account more than one criterion. The sort() command has an additional parameter that provides the name of a comparison function which will return a true or false value to determine how each element should be sorted relative to another.

Perl strings and sorting are essential elements for mastering this powerful language. With a proper understanding of the index(), substr(), sprintf(), and sort() commands, you can use Perl to manipulate and sort data more efficiently.

What Is Perl Smart Matching and given-when?

The Perl Smart Match operator, written as ~~ (two tildes), is a powerful feature of the language that allows you to compare two values for equality. It works with any data type and can be used to check if one value matches another or if an item exists in a list. The Smart Match operator has higher precedence than most other operators, so it is important to be mindful of its use when writing code.

The given statement allows you to do a series of comparisons using the Smart Match operator in one expression. Instead of checking each variable separately, you can write one statement that will check all values at once. This makes your code more efficient and easier to read.

The when statement is used to match multiple items against a single value. It works with the given statement and can be used to evaluate all values in one expression. This makes it easier to write code that checks for different scenarios without repeating yourself.

Perl Smart Matching and given-when are powerful features of the language that can be used to compare values and check if an item is present in a list. It makes code more efficient and easier to read while allowing developers to write fewer lines of code.

What Is Perl Process Management?

Perl process management is a powerful tool for managing processes on your system. It includes the system function, environment variables, and exec function, as well as the ability to capture output with backquotes. In addition, you can work with external processes using IPC::System::Simple, or direct them as filehandles. You can also use fork to get down and dirty with your processes, or send and receive signals. With the right knowledge of Perl process management, you'll be able to control your system's processes more effectively.

Processes are at the heart of any modern computing environment and they're essential for carrying out tasks such as running programs and manipulating data. Learning how to manage processes with Perl can help you gain the confidence and control you need to get the most out of your system. From understanding environment variables to using fork or sending signals, Perl process management provides a range of powerful tools for managing your processes efficiently and effectively.

By familiarizing yourself with these tools, you'll be able to start mastering the basics of Perl process management. With a better understanding and knowledge, you'll be able to use these powerful tools to gain control over your system's processes and ensure that tasks are carried out efficiently.

What Are Some Advanced Perl Techniques?

Perl is a powerful and versatile programming language that can be used to create sophisticated and complex applications. Its flexibility allows developers to employ advanced techniques, such as slices, trapping errors, picking items from a list with grep, transforming items from a list with map, and employing fancier list utilities.

Slices are a type of operation that allows developers to extract parts of larger data structures such as hashes or arrays. Through slices, developers can easily access multiple elements at once instead of using a looping mechanism to iterate through each element individually.

Trapping errors is another advanced technique that comes in handy when coding with Perl. It enables the programmer to catch and handle any errors that may occur. This is a useful tool to ensure stability and accuracy within programs by preventing unexpected behavior caused by unhandled errors.

Grep and map are two powerful list utilities available in Perl. Grep allows developers to quickly search through and pick out items from a list based on certain conditions, while map enables them to apply transformations and modifications to items from a list.

Perl also offers various fancier list utilities such as sort, uniq, and shuffle, each of which allows for different types of sorting and manipulations within lists. Using these complex operations can help simplify the code and make development faster and easier.

By taking advantage of these advanced Perl techniques, developers can create efficient and powerful applications that are both reliable and secure. With the right knowledge, Perl programming is an incredibly versatile skill to have in a developer’s toolkit.







Related Perl Information:

How Much Do Perl Programming Training Courses Cost?

Public instructor-led Perl Programming course prices start at $1,740 per student. Group training discounts are available.

Self-Paced Perl Programming eLearning courses cost $250 at the starting point per student. Group purchase discounts are available.

What Perl Programming Skills Should I Learn?

A: If you are wondering what Perl Programming skills are important to learn, we've written a Perl Programming Skills and Learning Guide that maps out Perl skills that are key to master and which of our courses teaches each skill.

Read Our Perl Programming Skills and Learning Guide

Is Perl Difficult and Time-Consuming to Learn?

A: As a programming language, Perl can be a little challenging for novices to learn. Its syntax can appear jumbled when compared to cleaner languages like Python. How long it will take you to learn Perl can depend on your skill set and how you want to use the language professionally. Some users may only need a few days to become comfortable with using the language, while others might need to devote years to intense study. Working with this language has several benefits, including the ability to save time through concise coding and create modern applications.

More Information on How to Learn Perl Online

How can I learn Perl?

A: There are a few different ways that you can learn Perl. One way is to find resources online and another is to take group onsite training classes. Whichever route you choose, make sure that you find reliable resources so that you can gain a strong understanding of the programming language.

If you want to learn Perl on your own, there are a few places you can start. The Perl website offers a beginner's guide as well as other documentation that can help you get started. Alternatively, you can search for online tutorials or join forums where experienced Perl programmers can help answer your questions.

Taking formal Perl training classes is another great way to learn Perl. These classes will provide you with the opportunity to receive hands-on instruction from an experienced Perl programmer. In addition, you'll be able to interact with other students who are also learning the programming language. This can be a great way to get support and advice from your peers.

No matter which method you choose to learn Perl, make sure that you find resources that are reliable and comprehensive. This will ensure that you gain a strong understanding of the programming language so that you can use it effectively in your own projects.

Is Perl hard to learn?

A: No, Perl is not difficult to learn. In fact, many people find it much easier to learn than other languages. The reason for this is that Perl has a very concise syntax and a large number of built-in features that make programming tasks much easier. Additionally, the community of Perl programmers is very supportive and always willing to help those who are just starting out.

Is Perl a scripting language?

A: Yes, Perl is a scripting language. It is used for automating tasks and can be embedded into other applications. Perl has a wide range of features that make it versatile and powerful, making it a popular choice for many different types of tasks.

What are the top Perl skills?

A: Perl is a versatile scripting language that can be used for a variety of tasks, from simple text processing to complex system administration. While Perl is not as widely known as some other languages, it is still in high demand by employers. Here are some of the top Perl skills that employers are looking for:

Top Perl Skills

1. Regular Expressions: Regular expressions are a powerful tool for matching and manipulating text. Perl's regular expression syntax is particularly rich and expressive, making it an essential skill for any Perl programmer.

2. Object-Oriented Programming: Object-oriented programming (OOP) is a style of programming that organizes code into reusable objects. OOP can make code more modular and easier to maintain. Perl's OOP support is extensive and well-designed, making it a good choice for projects that make use of OOP concepts.

3. Text Processing: Perl's ease of text processing makes it anv ideal language for working with data in text format, such as log files or CSV files. Perl's built-in regular expression support makes it particularly well-suited for this task.

4. System Administration: Perl is often used for system administration tasks, such as automating common tasks or writing monitoring scripts. Perl's wide range of available modules makes it easy to interface with many different system components, making it a versatile tool for system administrators.

5. Database Interaction: Perl can be used to interact with databases, either directly via Perl's DBI module or through an interface such as DBD::mysql. This makes Perl a good choice for scripts that need to extract data from databases or perform other database-related tasks.

These are just some of the top Perl skills that employers are looking for. If you're looking to make yourself more marketable as a Perl programmer, these are skills worth learning.

Where Can I Learn More About Perl Programming?

Perl Programming Blogs

Perl Programming User Groups

Perl Programming Online Forums

Explore Perl Training Classes Near Me:

Certstaffix Training provides Perl classes near me or online, depending on the number of students involved. We offer online courses for individual learners, as well as in person classes at your office for corporate groups. Our trainers are highly experienced professionals with the expertise necessary to help you gain a thorough understanding of Perl concepts and tools. With our courses available online for individuals or in person for corporate groups, it's easy to develop your Perl skills. Start learning today and see how Certstaffix Training can help you reach your goals.







Registration:

Have a Group?
Request Private Training

No sessions available

Start your training today!