Hands-on Perl
Objectives Who should attend Course Outline
LC-1.0
What you will receive
- Programming Fundamentals course kit
- Professional Perl programming instruction
What you will learn...
- How to write Perl programs using UNIX utilities
- Arrays Regular expressions Functions Modifiers Formatting Processes
- File Management
Who should attend
- Those interested in gaining knowledge or expanding their knowledge of Perl at any level You must have knowledge and experience with UNIX commands and utilities
- Language programmers seeking to add Perl expertise
Course Outline
Practical Extraction and Report Language (PERL)
- History and purpose of Perl
- Basic concepts
Scalar Data
- Scalar values
- Operators Scalar variables Operators for scalar variables
- Safe coding practices
Arrays and List Data
- Array Variables
- <STDIN> in an array context
Branching and Looping
- Statement blocks
- if/unless, while/until, do, for, foreach
Hashes
Input and Output
- Input from <STDIN>
- print/printf
- Here documents
The Power of Regular Expressions
- What are regular expressions ?
- Patterns Grouping patterns Matching operator variants Substitutions Other operators
- Regular expression options
Functions
- System and user-defined functions
- Return values and arguments
- Variable number and parameters
Loop and Program Flow Modifiers
- Introduction
- last, next, redo operators naked, labeled blocks goto Expression modifiers
- &&, II and ?: as control structures
Filehandles and File Tests
- Filehandle – what is it ?
- Opening/closing a filehandle Using filehandles File tests
- stat() and Istat() operators
Formatted Output
- 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 Sending a file to the printer
- Using fork() and exec()
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
|