X

PERL PROGRAMMING

SYNOPSIS

This is our main Perl training course. It covers general Perl programming together with system and database interaction. The basic four-day course is a grounding in using the Perl programming language as a successful Perl programmer and/or system administrator.

Perl Programming: a 4-day course

Delegates have usually encountered some Perl before, but may not always have found it easy to learn or use. The course is for developers who want to learn the Perl way of doing things. It emphasizes taking advantage of Perl’s native productivity tools and techniques, rather than trying to make do with other language’s idioms.

The course covers the fundamentals of Perl from the beginning, as we have found that a good understanding of how and why Perl does things in particular ways helps everyone to learn more effectively; even those who have been programming in Perl for a couple of years.

  • This Perl course assumes that delegates can already program in at least one programming language or scripting language.

This is a hands-on practical workshop based around the coding of real-world solutions to real-world problems.

Please contact us at sales@e-opensource.com to arrange delivery of any of our Perl courses for your company or to register an interest in an individual place on a public presentation of this Perl course. Please state clearly which of these options applies to you.

  • Contents:
  • Things you need to know and do in order to run Perl programs and learn Perl programming
  • A module designed for complete beginners
  • The perl compiler/interpreter
  • Perl under Unix/Linux
  • Perl under MS Windows 2000/NT/95/98/ME (perl.exe)
  • ActiveState Perl
  • Making programs executable (chmod +x)
  • Perl from the command line (perl command)
  • Specify the perl compiler/interpreter (#!)
  • Using plain text for programs
  • Writing a very simple program
  • Running a very simple program
  • Basic syntax
  • Enough of the language to get started
  • The print function
  • Variables
  • Scalars numbers and strings
  • Assignment
  • Simple conditional tests if
  • Lists
  • Arrays for storing lists
  • foreasing pch loops
  • Hashes
  • Other loops: while, for, do, until
  • Arrays the rest
  • Simple input, e.g., while(<>)
  • Functions overview recognising, writing, using
  • Simple file handling open, print
  • Subroutines parameters in and out, listification, local variables (my)
  • Help perldoc, books, web
  • Text manipulation with regular expressions
  • Matching strings
  • Matching the default variable
  • Case-sensitivity and matching
  • Special characters
  • Special characters: where
  • Special characters: what
  • Special characters: how many
  • Built-in character classes
  • Built-in character class examples
  • Capturing
  • Regular expression examples
  • Substitution
  • Global substitutions
  • More flow control
  • Statement modifiers
  • Quoting mechanisms qq(), etc.
  • Here documents
  • Uppercase/lowercase conversion
  • Splitting strings into lists
  • Joining lists into strings
  • Filtering lists with map
  • Sorting lists
  • The importance of context
  • Assignment shortcuts
  • Scoping rules
  • Special variables
  • Limits of flat lists
  • Nesting arrays
  • Array references
  • Anonymous arrays
  • Named array references
  • Passing multiple arrays to/from functions
  • Hashes of arrays
  • Hash references
  • Arrays of hashes
  • Hashes of hashes
  • Complex nested data structures
  • Code references
  • Dispatch tables
  • How to read Perl’s documentation
  • Where to find more information
  • Knowing what’s out there to look for
  • FAQs
  • The Comprehensive Perl Archive Network (CPAN)
  • Why effective Perl programmers are efficient CPAN users
  • CPAN’s philosophy
  • Finding modules
  • Installing Modules
  • Using modules
  • Some particularly useful modules
  • Avoiding bugs
  • Perl’s built-in debugger
  • Invoking the debugger
  • What you can do with the debugger
  • Understanding the debugger’s command line interface
  • Knowing the debugger’s basic command set
  • Exploring some extended functions
  • Graphical debuggers
  • Alternative debugging techniques
  • General principles
  • Using Perl as a filter
  • Editing files in-place
  • Many real world examples
  • Command line flags
  • Many examples using regular expressions
  • Wheels you don’t need to re-invent
  • Common recipes
  • Common pitfalls
  • The Philosophy of Perl
  • Why good style is important
  • Good style
  • Bad style
  • Interacting with SQL databases from Perl
  • Using DBI
  • Connection/disconnection, log in/log out
  • Retrieving a single record
  • Retrieving multiple records
  • Update/insert queries
  • Place-holders and bind values
  • Connecting through ODBC
  • Types of open
  • Filehandles
  • Reading line by line
  • Reading paragraph by paragraph
  • Reading entire files
  • Special variables
  • The flip-flop operator (..)
  • File test functions
  • Pipes
  • Connecting to other programs
  • Unsafe pipes
  • Using IO::Pipe
  • Grabbing a program’s output
  • Other ways to run programs
  • Potential security pitfalls
  • Coding for security
  • Taint checking
  • Dangerous environment variables
  • File input
  • Set-user-id Perl programs
  • Permissions and users