Author Joshua Mostafa takes users through the versatile and powerful programming language known as PERL, a server side language whose primary duty is to handle dynamic content and service clients on the Internet. What separates PERL from other scripting languages is its flexibility. Users don t need to code in a certain way to effectively use PERL and have fun doing it. Joshua shows you what tools you need to get started in PERL and what resources to visit in order to perfect your scripting. Start learning now by clicking one of the topics below!
ConceptsWelcome: what is Perl?Perl and the WebStatic Web contentDynamic Web contentWhat you ll need (1)What you ll need (2)Your first script: hello worldRunning your first script on a web serverFirst StepsProgram flowVariablesStrings and quotesMore about stringsBasic operatorsCombined operatorsMore combined operatorsData TypesScalars, hashes and arraysWorking with arraysMore about arraysArray functionsMore array functionsMultidimensional arraysTaking elements out of arraysMore array manipulationWorking with hashesExtracting data from hashesMultidimensional hashesNow you try: Data TypesMaking ChoicesIntroducing 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 StructuresRepetition: 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 MatchingExtracting 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 FilesystemReading 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
CGIRunning 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 TechniquesReusing code
Subroutines
Arguments
Returning a value
Explicit returns
Variable scope
Modules and Packages (1)
Modules and Packages (2)
Database InteractivityPerl and databases
Connection handles
Statement handles
Running the script
Using placeholders in SQL
Now you try: Database Interactivity
Click here to find out more about the Perl Fundamentals Training CD