Course in Perl

Course in Perl programming

Perl is a hugely versatile language and is used application ranging from quick command one-liners, effective system scripts to full-scale business applications. A Perl script executes impressivly fast and can process a vast amount text without any problem.

In this fully loaded course, you will learn everything you need to know in order to get up and running developing in Perl. We will show and discuss a selection of Perl applications we have developed during many of our consultancy engagements.

This is what you will learn
  • Perl syntax
  • Different ways of invoke Perl scripts
  • Perl regex
  • Text processing
  • Data types
  • Effective I/O
  • Handling of external/forked program processes
Course Contents

Background and Overview

  • What is Perl
  • Basic syntax
  • Installation of Perl

Setting up the Environment

  • Installing Perl
  • Installing Intellij
  • Installing the Camelcade plugin
  • Setting up a Perl project

Scalar Data Types

  • Perl variables, understanding '$'
  • Integral and floating-point values
  • Text strings
  • Text substitution (interpolation)
  • Operators
  • Simple I/O

Composite Data TYpes

  • Arrays & List data
  • Array operators
  • Understanding scalar vs array context
  • Associative arrays
  • Operators for associative arrays
  • Simpler I/O using arrays
  • How to use <STDIN>

Regex

  • What is regular expression (regex)
  • Patterns
  • Basic regex syntax
  • Understanding pattern groups
  • Regex operators
  • Regex options, such as case-insensitive matching
  • Regex substitution
  • Split / join

Functions

  • Overview of built-in functions
  • Writing your own functions
  • Understanding scope and local variables
  • What can you return from a Perl function
  • Passing parameters to a sub

Statements

  • If statement
  • Loops
  • Jumping using next / last
  • Suffix statements, such as 'unless'
  • Logical expressions using ‘&&’, ‘||’ och ‘?:’

Accessing Files

  • Opening a file for reading or writing
  • Accessing opened files using handles
  • Reading from or writing to external processes
  • Using the handy backtick operator '`'

References

  • What is a reference
  • Taking a reference to a scalar value
  • References to lists
  • References to maps
  • Nested data structures

Closures

  • References to functions
  • Anonymous data lists and maps
  • Anonymous functions and closures
  • Stacked function invocations
  • Schwartzian transformations

Modules

  • What is a module
  • Using require
  • Understanding @INC
  • Packages and namespaces

Standard Perl Modules

    CPAN

      Objects

      • What do we mean with object-oriented programming
      • How to create the illusion of classes and objects in Perl
      • Instance data
      • Methods
      • Constructors
      • Getters and setters

      Advanced Object-Orientation i Perl

      • Destructors
      • Inheritance
      • Using class generators

      Testing

      • What do we mean by unit testing
      • Overview of test modules in CPAN
      • Understanding TAP
      • Writing a test
      • Running a test suite

      Perl from the Trenches

        Facts
        NamePerl
        Duration3 Days
        LevelBeginner
        AudienceProgrammers
        Prerequisites Practical knowledge in a regular programming langauge, such as Java or C++
        Tools
        • Perl 5, via cygwin, ActiveState, StrawberryPerl för Windows
        • Perl 5, tillgängligt i Ubuntu Linux
        • Text editor or JetBrains IDEA with the Perl plugin
        • Windows or Ubuntu Linux
        On-Site Course

        If you order an On-Site course, we will come to you and hold the course in your office. The price is determined by our price model and is based on the number of course days, number of participants and any travel and lodging.

        Read more about out price modell and term of sales here.

        Related Courses
        CourseDaysLevel
        BASH Shell Scripts Programming1BeginnerShow
        Erlang3BeginnerShow