<<

"Charting the Course ...

... to Your Success!"

Intermediate

Course Summary

Description

This course builds on "Beginning Perl", for developers who are moving from simple scripts to creating applications and modules. The course expands on the basic syntax and operators that students already know, letting students use Perl's resources to their best advantage, including report writing, structures, database access, and creating reusable modules.

Objectives At the end of this course, students will be able to:

Create efficient data structures using references Understand advanced text parsing techniques Create reusable modules Design and use classes Query and update data from relational database systems

Topics

Shortcuts Advanced Text Parsing References Modules and Classes The Perl DBI (database access) Best Practices

Audience

This course is designed for Perl developers who are ready to move beyond the introductory level.

Prerequisites

Students should have completed "Beginning Perl" or have equivalent experience.

Duration

Three days

Due to the nature of this material, this document refers to numerous hardware and software products by their trade names. References to other companies and their products are for informational purposes only, and all trademarks are the properties of their respective companies. It is not the intent of ProTech Professional Technical Services, Inc. to use any of these names generically

PT7856_INTERMEDIATEPERL.DOC

"Charting the Course ...

... to Your Success!"

Intermediate Perl

Course Outline

I. Raw file and data access G. The /o modifier A. Opening and closing raw (binary) files H. Working with embedded newlines B. Reading raw data I. Making REs more readable C. Using seek() and tell() J. Perl D. Writing raw data E. Raw data manipulation with pack() and VII. Using the Perl Library unpack() A. The Perl library B. Old-style library files II. Formatting output C. Perl modules A. Using sprintf() and printf() D. Modules bundled with Perl B. Report formatting overview E. A selection of modules C. Defining report formats F. Getting modules from ActiveState D. The write() function G. Getting modules from CPAN H. Using Getopt::Long III. References A. Why is a reference? VIII. Creating Modules B. References to existing data A. Review of subroutines C. References to anonymous data B. Understanding my () and local () D. Dereferencing C. Packages and the symbol table E. References and subroutines D. Mechanics of module creation F. Building data structures E. Exporting subroutines and data F. Using BEGIN and END IV. Working with the operating system G. Good module design A. Determining current OS B. Environment variables IX. Classes C. Running external programs A. Perl's approach to Classes D. User identification B. Understanding bless E. Trapping signals C. Constructors F. File test operators D. Methods G. Working with files E. Properties H. Time of day F. Inheritance

V. Shortcuts and defaults X. Database Access A. Understanding $_ A. Understanding the DBI B. shift() with no array specified B. Connecting to a database C. Text file processing C. Executing queries and fetching results D. Using grep() and Using map() D. Obtaining metadata E. Command-line options for file processing E. Advanced DBI issues

VI. Data wrangling A. Quoting in Perl B. Evaluating arrays C. Understanding qw( ) D. Getting more out of the <> operator E. Read ranges of lines F. Using m//g in scalar context Due to the nature of this material, this document refers to numerous hardware and software products by their trade names. References to other companies and their products are for informational purposes only, and all trademarks are the properties of their respective companies. It is not the intent of ProTech Professional Technical Services, Inc. to use any of these names generically

PT7856_INTERMEDIATEPERL.DOC