Description
In this course, you will learn:
- The details of the Perl syntax, from variables, conditionals, loops, and data structures to regular expressions, functions, and references.
- Quick-start guide is included for experienced developers who want to get up and running with Perl 5 fast, and the entire course is recommended for both new and experienced programmers alike.
- Handling and reusing code with Perl modules, plus Perl best coding practices.
Syllabus :
- Welcome
- Exercise files
1. Setting Up
- Installing Komodo for Mac OS X
- Installing Perl and Komodo for Windows
- About Perl
- Chapter Quiz
2. Quick Start
- About the quick start
- Hello World
- Counting lines in a file
- Loops and conditionals
- Functions
- Using perldoc
- Chapter Quiz
3. Basic Syntax
- Anatomy of a Perl script
- Statements and expressions
- Assignments
- Whitespace and comments
- Blocks and scope
- Chapter Quiz
4. Values and Variables
- Understanding values and variables
- Numeric variables
- Character strings
- Logical values
- Lists and arrays
- Slices of arrays
- Hashes or associative arrays
- Constants
- Chapter Quiz
5. Conditionals
- The if statement
- Else and elsif
- Negative conditionals with unless
- Switch with given and when
- The ternary conditional operator
- Chapter Quiz
6. Loops
- Understanding loops
- Loops with while and until
- Iterating with for
- Iterating with foreach
- Loop control statements
- Chapter Quiz
7. Special Variables
- The default variable
- Function arguments
- The autoflush variable
- The system error variable
- Other special variables
- Chapter Quiz
8. Operators
- About Perl's operators
- Basic arithmetic operators
- Compound assignment operators
- Relational operators
- Logical operators
- File test operators
- The range operator
- The string concatenation operator
- Quote operators
- Chapter Quiz
9. Regular Expressions
- About regular expressions
- Matching text
- Common modifiers
- Extracting matches
- Getting a list of matches
- Simple matches
- Matching wildcards
- Matching classes of characters
- Matching metacharacters
- Search and replace
- Splitting strings
- Chapter Quiz
10. Functions
- Understanding functions
- Defining and calling functions
- Calling a function with arguments
- Locally scoped variables
- Returning values
- Static variables
- Predeclared functions
- Chapter Quiz
11. References and Structures
- Understanding values and references
- Array references
- Hash references
- Function references
- Finding the type of a reference
- Mixed data structures
- Chapter Quiz
12. File I/O
- Understanding streams and files
- Using file handles
- Using the OO interface for files
- Working with binary files
13. Built-In Functions
- The print() and say() functions
- The die() function
- String functions
- Numeric functions
- List and array functions
- Time functions
- The undef function
- Chapter Quiz
14. Modules
- Leveraging code with modules
- Perl's object model
- An example module
- Using Carp for error messages
- Chapter Quiz
15. Best Practices
- Be consistent
- Selective use of comments and whitespace
- Use strict and warnings
- Use constants