Introducing Perl in just 4 hours

I was recently asked to give a 4 hour long presentation introducing Perl.

It is aimed to be some kind of an "enhancement talk" given to a wide range of audience in a company where Perl is not used.

I asked my contact to describe the audience a bit better, but while I am waiting for his response, I started to write down what I plan to talk about.

My objective is to let them see in which of their tasks can Perl be useful and/or to see what they might learn from Perl.

I need your help in improving this offer. What do you think should be covered in this?

The plan

To achieve the former, my plan is to show some stuff that can be immediately useful for programmers, QA and CMS engineers who build an application or service that is NOT using Perl.

For the second part, I plan to show some things that can be done using Perl that might be just plain interesting to play with, but might have less immediate use for them. (e.g. GUI and Web development). Even though my first use of Perl was building an in-house web interface to a build-server.

In addition, I plan to show something internal to Perl, that might be interesting for people. Maybe Moose and MOP.

I probably need to show how to use Perl in various areas of software development. e.g. Testing, Configuration management, build automation.

Show both verbose version of Perl programming that fits better applications and some one-liners for throw-away programming.

As we have 4 hours we might even go beyond just simple raising interest. We can already make it useful by going over the syntax of Perl and giving them some hands-on exercise.

I am preparing this for one specific request but I think this presentation can be interesting to a number of companies and it might be interesting to offer it around YAPCs and Perl Workshops as well.

Let's see how can I describe this 4-hours presentation.

Introducing Perl in just 4 hours

In this presentation you'll be introduced to the Perl programming language. You will get a basic understanding of its syntax and you will see a number of examples for tasks that can be done using Perl.

This can be immediately useful if you are doing system administration, or if you are in QA doing test automation. It can help if you are a build engineer, or work in configuration management.

It can help you with tasks processing large log files and generation reports.

The first part about syntax will cover:

  • Perl on Windows and Linux
  • Variables (scalar, array, hash)
  • Literal values (scalars, lists, boolean)
  • Subroutines
  • Context
  • References
  • Flow control: if else elsif
  • Loops: for, foreach, while
  • Statement modifiers (Inverse syntax)
  • Ternary operator
  • Regular expressions: Matching and substitution
  • OOP Object Oriented Programming

There will be diverse examples:

There will be some traditional examples for reading and writing CSV and Excel files. We will see examples for parsing log files and one-liners for some simple tasks.

You will see a GUI desktop application written in Perl and examples building modern web applications. Both HTML based and Ajax-based sites communicating in JSON between front-end and back-end. Writing a HTTP client for web crawling (screen scraping) or for testing web applications.

Sending HTML mail with attachment.

Database access using plain SQL and wrapping it with an ORM (Object-relational mapping).

Perl and NoSQL.

Event driven programming.

XML processing.

Drawings, diagrams and Images.

Scientific programming.

Game programming using SDL.

What else or what less?

It seems to be a lot to cover in just 4 hours.

Obviously I cannot go deep in any of the subjects. Just show an example and maybe hand over the example script so they can play with it.

OTOH maybe I missed something important that can make it interesting or fun to show. What do you suggest?

Published on 2012-03-25 by Gabor Szabo