
Discover the power of Perl, a high-level, open-source scripting language with powerful regular expressions. Apply hands-on basics and advanced concepts like file operations, MySQL interfacing, and HTML generation.
Outline prerequisites and tool versions, then cover Perl basics and concepts, including data types, operators, loops, regular expressions, file and spreadsheet I/O, SQL and MySQL interfacing, modules, and HTML generation.
Find and set up Perl by installing Strawberry Perl on Windows or other systems, or use online interpreters, then write plain text Perl code with editors like Notepad++ or Vim.
Set up Perl on Windows with Strawberry, locate the Perl interpreter on the C drive, verify the version (5.26.2), and access documentation via perldoc and man perl.
Write your first Perl program and learn the shebang interpreter line, the minus W flag or use warnings, and use strict for variable checks, including hello world printing.
Learn the three perl data types: scalars, arrays, and hashes; understand scalar values, the dollar sigil, and my scope, plus array indexing, push/pop, and hash key-value access.
Explore Perl operators across numeric, string, coding, boolean, and list categories, including increment and decrement, concatenation, bitwise shifts, comparison, and common helpers like split, join, sort, reverse, and grep.
Explore Perl loops and conditional statements, including for, for each, until, and while; use dollar underscore for the current element, print arrays and hashes, and enforce braces.
Learn how Perl subroutines group related statements into tasks, pass arguments by value or reference, and support recursion to compute results like factorial, improving readability and modularity.
Explore regular expressions in Perl by examining special characters, quantifiers, anchors, and pattern matching. Apply substitution with case-insensitive and global options, and practice with basic file read/write operations.
Learn Perl file read and write operations by opening files with handles, performing read, write, and append actions, using tests (-e, -r, -w) and error handling.
Discover how to read and write Excel spreadsheets in Perl, using Spreadsheet::WriteExcel and Spreadsheet::ParseExcel to create workbooks and worksheets, perform writes, and read data.
Explore Perl spreadsheet formatting with write Excel and parse Excel modules, setting column widths, alignments, color, bold, and font, while reading, writing, and formatting cells and formulas.
Master the basics of the structured query language for managing databases and tables, and learn to interface Perl with MySQL for data operations like insert, select, and delete.
Learn how to connect Perl to a SQL server using a DSN and DB module, then perform select, insert, and delete operations with prepare, execute, and fetch row array.
Explore html basics, including doctype, html, head, and body, and learn how to generate html documents using a user created perl module to produce html content.
Discover how to build a Perl module as a package, define subroutines, and generate HTML content with an HTML handler that formats headers, colors, lists, tables, and links.
Perl stands for Practical Extraction and Reporting Language. It was developed in 1987 by Larry Wall, and it has evolved over time. It’s a High-Level Scripting Language supporting powerful regular expressions.
Aim of this Course
Is to help:
Beginners get started with Perl,
Professional hone their Perl skill set, and
Experts refresh their Perl knowledge,
Topics Covered
1. Introduction
2. Course Overview
3. Finding Perl
4. Perl Basics – Getting Started
First Perl Program, Data Types, Operators, Loops, Conditional Statements, Subroutines
5. Regular Expressions
Special Characters, Quantifiers, Anchors
6. File Read and Write Operations
Few Facts, File Checks, File Read, Write, Append, and Read Write
7. SpreadSheet Read and Write Operations (including various formatting operations)
Relevant Modules to use, SpreadSheet Read, SpreadSheet Write (with various formatting operations)
8. Interfacing with MSSQL databases
SQL Basics (How to create a database and table, how to use a database, how to insert into, query from and delete from a database), Using Perl to connect to MSSQL database and perform various different table operations.
9. Generating HTML formatted content (Using User created Perl Module)
HTML very brief overview, How to create and use a Perl Module, Generate HTML formatted content in Perl using the generated Perl Module.
Why Use Perl?
Disclaimer
Every effort has been made to make this course as complete and as accurate as possible, but no warranty is implied. The author shall have neither the liability nor the responsibility to any person or entity with respect to any loss or damages arising from the information contained in this course or other resources accompanying this course.
This course is an independent work of the author and is not endorsed by his employer.