Understanding Perl Programming


Course Description

The Understanding Perl course is designed to equip participants with practical skills in Perl programming. Whether you’re a beginner or an experienced developer, this course will empower you to harness the power of Perl for various tasks, especially in the context of Linux operating systems. By the end of the course, participants will have a solid grasp of Perl’s capabilities and how it remains relevant today. This course would be ideally suited for programmers who know other languages like Python to transition to working with Perl.

Duration: 3 days


Pre-requisites

Knowledge of general programming concepts in any programming language.

Perl Environment

Perl versions Editor Runtime environment CPAN

Organising your code

Perl style guide .pl files Subroutines Creating modules Using .pm files Introduction to debugging

Object Oriented Programming in Perl

OOP Features of an Object Oriented Programming Language Putting objects into modules Using objects from modules Some simple objects

Writing and Calling Perl scripts

Creating a script Running the script Handling command line parameters Understanding streams Opening a file stream The UNIX / Linux philosophy for command line utilities Working with STDIN, STDOUT and STDERR

Regular Expressions

Getting started Formulating and testing your regular expressions Core features Search Replace Some intermediate techniques Some more advanced techniques

OS Operations

Working with the file system Directory operations Listing files Executing OS commands Getting output from OS commands run using system()

Working with XML Files

Perl modules for XML processing Extracting data from an XML file Validating using an XSD Writing data to an XML file Transforming XML files using XSLT Querying XML files using XPATH

Web scraping

Understanding document structure Parsing a HTML document Perl modules for scraping Extract data from a table on a web page into Perl data structures.

More Debugging Techniques

Using print statements Logging Writing to STDERR Debugger

Web Development Overview

How can Perl be used to create a web application? What is CGI Scripting A simple web application

Automated Testing

What is automated testing? Why are tests vital when working with legacy code? Some simple tests

Best Practices

Coding conventions Importance of comments Importance of good variable names Splitting functionality up into subroutines Splitting functionality up into modules DRY - don't repeat yourself Working with large files Monitoring memory usage


Perl Perl Programming Linux