Crs 150 Introduction to Perl
Perl has been described as a kind of "Swiss Army Knife" of Unix like
tools and utilities combined in a scripting language. The purpose of this
course is to provide a gentle yet thorough introduction to the language
of Perl, and an overview of some of the most useful and commonly encountered
Perl modules.
The course does not focus in on any particular application area, and hence
is useful for a variety of Perl users such as Web developers, System
Administrators, Bioinformatics application developers and even Database
Administrators. |
Course Outline
The Philosophy and Style of Perl
- Advantages of working with an interpreted language
- Perl's heritage in Unix
- Perl's extensibility
- Large number of Perl modules available for Perl
Perl Syntax and style
- Filehandles for basic Input/Output
- Statements and declarations
- Overview of Perl's data types
Scalars
- scalar values
- string literals
- metacharacters and quotation in string literals
- "Here" documents
- special literals
- variables and literals
operators
- arithmetic operators
- string operators
- assignment operators
- autoincrement and autodecrement operators
- logical operators
- comparison operators
control structures
- truth and falsity in Perl
- if -- elsif -- else statements
- SWITCH statements
- while loops and until loops
- for loops and foreach loops
- breaking out of loops with next and last
regular expressions
Arrays, Hashes, Typeglobs and Context
- arrays and list values
- associative arrays (hashes)
- scalar and list contexts
- void context
- interpolative context
- typeglobs and filehandles
Input operators
- backquote operator (command input)
- angle operator (line input)
- filename globbing operator
regular expressions and pattern matching - advanced treatment
- rules or regexp pattern matching
- regular expression extensions
- pattern-matching operators
scope rules
- global declarations
- scoped declarations
subroutines
- passing arguments
- returning values
- localising variables using my and local
- passing symbol table entries (typeglobs)
- passing references
- prototypes
generating formatted output
- using the printf subroutine
- using format and write
Perl special variables - an overview
- filehandle special variables
- regular expression special variables
- global special variables
- global special arrays
Perl's built in functions for
- manipulating scalars
- regular expressions and pattern matching
- numeric function computation
- array processing
- list processing
- hash processing
- input / output
- processing fixed length data and records
- working with filehandles, files and directories
- controlling flow of a script
- scoping
- performing system/process level tasks
- constructing and using modules
- constructing classes and objects
- interprocess communication
- obtaining user and group information
- obtaining network information
- socket programming
- time handling
Advanced topics
- references and nested data structures
- references and objects
- packages, modules and object classes
- working with the Standard Perl library
- debugging Perl scripts
|
Intended Audience
Attendees are expected to have some practical programming experience - i.e. to be
aware of constructs such as for and while loops, and if then else, variables,
and subroutines. All the Perl programming constructs are carefully explained, and
a considerable amount of time will be devoted to the difficulat topics
such as regular expressions and hashes.
Although examples of using Perl modules for Web development and for system administration
will be included in the course, these topics are dealt with in depth in more
specialised courses.
|