Perl Fundamentals

Concepts

Welcome: what is Perl?
Perl and the Web
Static Web content
Dynamic Web content
What you'll need (1)
What you'll need (2)
Your first script: hello world
Running your first script on a web server

First Steps

Program flow
Variables
Strings and quotes
More about strings
Basic operators
Combined operators
More combined operators

Data Types

Scalars, hashes and arrays
Working with arrays
More about arrays
Array functions
More array functions
Multidimensional arrays
Taking elements out of arrays
More array manipulation
Working with hashes
Extracting data from hashes
Multidimensional hashes
Now you try: Data Types

Making Choices

Introducing conditionals
Conditional operators
Conditional blocks
The equality operator
String comparison operators
else clauses
The elsif ladder
Logical operators
Nested conditionals
Now you try: Choices

Loops and Control Structures

Repetition: the while loop
Using the while loop
The do..while loop
Iteration: the for loop
Looping over an array
Nested loops
The foreach loop
Now you try: Loops

Strings and Pattern Matching

Extracting a substring
Locating a substring (1)
Locating a substring (2)
Changing case
Here-document style strings
Introducing regular expressions
Matching simple patterns
Case-insensitive pattern matching
Matching globally
Wildcards
Character sets (1)
Character sets (2)
Quantifiers
Using quantifiers (1)
Using quantifiers (2)
Alternation
Subpatterns (1)
Subpatterns (2)
Greedy vs non-greedy quantifiers
Examples of non-greedy matching
Replacing using patterns
Subpattern replacement (1)
Subpattern replacement: (2)
Now you try: Strings

Interacting with the Filesystem

Reading from a file
Writing to a file (1)
Writing to a file (2)
Writing to a file (3)
Reading a files contents at once
Changing the default output filehandle
Reading user input from the command line
An interactive shell script
Refining the script (1)
Refining the script (2)
The script complete
Working with directories
Changing the current working directory
Running executable files (1)
Running executable files (2)
Command-line arguments
Now you try: Interacting with Filesystems

CGI

Running a CGI script on localhost
Checking errors
Uploading your script (1)
Uploading your script (2)
Environment variables (1)
Environment variables (2)
Serving HTML
The query string
Accessing GET variables
Handling URL-encoded characters
Using HTML forms
Reading POST data
Now you try: CGI

Intermediate Coding Techniques

Reusing code
Subroutines
Arguments
Returning a value
Explicit returns
Variable scope
Modules and Packages (1)
Modules and Packages (2)

Database Interactivity

Perl and databases
Connection handles
Statement handles
Running the script
Using placeholders in SQL
Now you try: Database Interactivity