Home Contact Resources Training Profile Clients Careers


Perl Programming


Length: 4 days
CourseID: perl



Prerequisites:

Knowledge of UNIX fundamentals and experience with the UNIX commands and utilities.


Overview:

Perl offers a wide range of functions for programming, system administration, distributed computering and Internet applications.


Objectives:

  • Learn the fundamentals.
  • Use command substitution and command history to construct pipeline commands.
  • Write Perl programs using UNIX utilities to build powerful applications in a short time.

  • Chapters:


    Practical Extraction and Report Language (PERL)

    An Introduction

    Scalar Data

    Scalar Values Operators
    Scalar variables Operators for scalar variables
    Safe coding practices

    Arrays and List Data

    Array Variables in Array Context

    Branching and Looping

    Statement blocks: if/unless, while/until, for

    Hashes

    Hash - What is it? Operators: keys, values, each, delete, exists

    Input and Output

    Input from print/printf
    Here documents

    The Power of Regular Expressions

    What are regular expressions? Patterns
    Grouping patterns Matching operator variants
    Substitutions Other operators
    Regular expressions options

    Functions

    System and user-defined functions Return values and arguments
    Variable number of parameters

    Loop and Program Flow Modifiers

    Introduction last/next/redo operators
    Naked block Labeled block
    Expression modifiers &&, || and ?: as control structures

    Filehandles and File Tests

    Filehandle - What is it? Opening/closing a filehandle
    Using filehandles File tests
    stat( ) and lstat( ) operators

    Formatted Output

    Introduction Defining a format
    Invoking a format More about fieldholders
    More about formats

    Accessing Directories

    Moving around the directory tree Globbing
    Directory handles

    File and Directory Manipulation

    Working with files Commandline arguments

    Managing Operating System Processes

    System function Backquotes
    Processes as filehandles Using the fork and exec functions

    String Manipulations and Sorting Numerically

    Working with substrings String manipulation with splice
    Formatting data with sprintf Advanced sorting
    Transliteration

    Hash Files and Text File Management

    DBM databases and DBM arrays Fixed-length random access databases
    Variable-length (text) databases

    Odds and Ends

    Introduction map
    grep References
    Hashes of hashes Closures
    One Liners a2p
    s2p