1. Perl
  2. Preface
    1. Content
  3. Introdcution
    1. Installation
    2. Editors
    3. IDEs
    4. Perl on the command line
    5. First script
    6. Safety net
    7. First sub
    8. First say
    9. print vs. say
    10. Debugging
    11. Avoid global variables
    12. Keep it Simple - KISS
    13. Comments
    14. Perl documentation
    15. POD - Plain Old Documentation
    16. Exercise: Hello world
  4. Scalars
    1. Scalars intro
    2. Scalar values
    3. undef
    4. Numbers - integers, real or floating-point
    5. Strings
    6. Scalar variables (use my)
    7. Sigils and variables
    8. Common error messages
    9. Greeting with a name, Variable interpolation
    10. User Input
    11. chomp
    12. Numerical Operators
    13. Autoincrement
    14. String Operators
    15. String - Number conversion
    16. Conditional statements: if
    17. Syntax of if statement
    18. Comparison operators
    19. Compare values - examples
    20. undef, the initial value and defined
    21. Boolean expressions (logical operators)
    22. Boolean values: TRUE and FALSE
    23. Your Salary is in Danger - Short-Circuit
    24. Exercise: Rectangular
    25. Exercise: Rectangular prompt
    26. Exercise: Rectangular warn
    27. Exercise: Concatenation
    28. Exercises: Simple Calculator
    29. Solution: Rectangular
    30. Solution: Rectangular prompt
    31. Solution: Rectangular warn
    32. Solution: Concatenation
    33. Solution: Simple Calculator
    34. Solution: Simple Calculator (using eval)
    35. String functions (length, lc, uc, index)
    36. String functions (index, rindex)
    37. String functions (substr)
    38. Strings - Double quoted
    39. Strings - Single quoted
    40. Scope of variables
    41. Scope of variables - 2
    42. Scope of variables - 3
    43. Scope of variables - 4
    44. Scope of variables - 5
    45. Random numbers
    46. Here documents - double quotes
    47. Here documents - single quotes
    48. Exercise: Number Guessing game
    49. Solution: Number Guessing game
  5. Files
    1. die, warn, exit
    2. while loop
    3. Loop controls: next, last
    4. Opening file for reading
    5. Opening a file
    6. Opening a file - error handling
    7. Opening a missing file
    8. Read one line from a file
    9. Process an entire file line by line (while, cat)
    10. Write to a file
    11. Sum of numbers in a file
    12. Analyze the Apache log file
    13. Encoding and UTF-8
    14. Open files in the old way
    15. Binary mode
    16. Reading from file, read, eof
    17. tell, seek
    18. truncate
    19. Exercise: Add more statistics
    20. Exercise: Write report to file
    21. Exercise: Analyze Apache - number of successful hits
    22. Solution: Add more statistics
    23. Solution: Write report to file
    24. Solution: Analyze Apache - number of successful hits
  6. Lists and Arrays
    1. Lists and Arrays intro
    2. List Literals, list ranges
    3. List Assignment
    4. loop over elements of list with foreach
    5. Create an Array, loop over with foreach
    6. Array Assignment
    7. Debugging an array
    8. foreach loop on numbers
    9. Array index (menu)
    10. Load Module
    11. Command line parameters
    12. Process command line parameters, use modules
    13. Module documentation
    14. process CSV file
    15. process csv file (short version)
    16. One-liner sum numbers in CSV file
    17. process csv file using Text::CSV
    18. process csv file using Text::CSV
    19. Join
    20. Labels
    21. Exercise: Make the color selector user friendly
    22. Exercise: improve the color selector
    23. Exercise: Improve the Number Guessing game
    24. Solution: improved color selector
    25. Solution: Improve the Number Guessing game
  7. Advanced Arrays
    1. The year 19100
    2. SCALAR and LIST Context
    3. Context Sensitivity
    4. Filehandle in scalar and list context
    5. slurp mode
    6. File::Slurp
    7. Diamond operator
    8. pop, push
    9. push example
    10. stack (pop, push) Reverse Polish Calculator
    11. shift, unshift
    12. queue (shift, push)
    13. shift
    14. reverse
    15. Sort
    16. Ternary operator
    17. Count digits
    18. Exercise: Color selector
    19. Exercise: sort numbers
    20. Exercise: sort mixed string
    21. Exercise: sort mixed string 2
    22. Solution: color selector files
    23. Solution: sort numbers
    24. Solution: sort mixed strings
    25. Solution: sort mixed strings
    26. List::Util
    27. Advanced: Multi dimensional array
  8. Functions and Subroutines
    1. Why to use subroutines?
    2. Subroutines
    3. Variable number of parameters
    4. Recursive subroutines: factorial
    5. Recursive subroutines: Fibonacci
    6. Sort using a function
    7. Return a list
    8. Return several elements
    9. Error handling with eval - files
    10. Error handling with eval - two calls
    11. Exercise: Subroutines
    12. Exercise: Number guessing in sub
    13. Solution: Number guessing in sub
  9. Hashes
    1. What is a hash?
    2. Uses of hashes
    3. Creating hashes
    4. Create hash from an array
    5. Hash in scalar context
    6. Fetching data from hash
    7. exists, delete hash element
    8. Multi dimensional hashes
    9. Count words
    10. Exercise: Parse HTTP values
    11. Exercise: Improve the color selector
    12. Exercise: Display scores
    13. Exercise: Analyze Apache log file
    14. Exercise: Parse variable width fields
    15. Solution: Parse HTTP values
    16. Solution: Improve the color selector
    17. Solution: Display scores
    18. Solution: Analyze Apache log file
    19. Solution: Parse variable width fields
  10. Shell to Perl
    1. Shell and Perl intro
    2. File test or -X operators
    3. Running External Programs
    4. Open pipe for reading
    5. Open pipe for writing
    6. Pager
    7. sendmail.pl
    8. UNIX commands from the inside
    9. File globbing (wildcards)
    10. Rename files
    11. Directory handles
    12. File::HomeDir
    13. More UNIX commands implemented in modules
    14. File::Spec
    15. Change Copyright text in every source file in a directory hierarchy
    16. Exercise: Tree
    17. Exercise: Check for UID 0
    18. Exercise: CPU load
    19. Exercise: MANIFEST file
    20. Solutions: Tree
    21. Solutions: Check for UID 0
    22. Solution: CPU load
    23. Solution: MANIFEST file
  11. Using Perl modules, using CPAN
    1. Using modules exporting functions
    2. Using Object Oriented modules
    3. Selecting Module to use
    4. Some interesting CPAN Modules: DateTime
    5. Days passed
    6. Some interesting CPAN Modules: Databases
    7. Some interesting CPAN Modules: Web
    8. Some interesting CPAN Modules: common file format
    9. Some interesting CPAN Modules
    10. Installing modules
    11. Installing modules from the os vendor
    12. Using CPAN.pm
    13. Configure CPAN.pm
    14. Installing modules manually
    15. Installing modules manually using Build.PL
    16. On Windows
    17. Changing @INC
    18. Changing @INC - Relative PATH
    19. local::lib
    20. CPAN.pm
    21. Installing modules on ActivePerl
    22. CPAN::Reporter
    23. Exercise: setup local::lib
    24. Exercise: Module installation
    25. Exercise: Read Excel file
    26. Solution: Module installation
    27. Solution: Read Excel file
  12. Applications
    1. Simple uses of Perl
    2. Create Unix user account
    3. Reporting file system diskspace usage (df)
    4. Reporting diskspace usage on the mail server
    5. A du like script
    6. Send files by e-mail
    7. Read Excel file
    8. Process file with fixed width records
    9. Process file with multiline records
    10. Process multi field csv file
    11. Fetch web page
    12. Generate web page
    13. Parse XML file
    14. Database access using DBI and DBD::SQLite
    15. Net::LDAP
    16. Tie::File
  13. Extra slides
    1. List all defined variables
    2. Perl internal variables
    3. What is Perl ?
    4. What does Perl stand for ?
    5. Scripting language ?
    6. Is Perl Interpreted or Compiled Language
    7. Why use Perl ?
    8. What is it good for ?
    9. Its strengths
    10. Redirection by the user
    11. for loop
    12. ASCII table
    13. default variable $_
    14. Return values
    15. UNIX file system, hard links symbolic links
    16. stat, lstat
    17. Compare values
    18. Bitwise Operations
    19. bitwise examples
    20. Filename creation based on date
    21. Debugging prints
    22. Where is perl installed on your system ?
    23. Send e-mail
  14. XML using Perl
    1. XML sample data
    2. XML Definitions
    3. XML processing modes
    4. XML::Simple
    5. XML::Simple dumped
    6. XML::Simple processing
    7. XML::Parser
    8. XML::Parser tree
    9. XML::Parser tree results
    10. XML::Parser
    11. XML::LibXML
    12. XML::XPath
    13. XML::Twig
    14. XML::Writer
    15. XML::Dumper
    16. Exercise: parse glade.xml
    17. DTD validation
    18. Specialized XML modules
    19. Resources
  15. Parsing HTML File
    1. HTML::Parser - fetch title
    2. HTML::Parser
    3. HTML::Encode
    4. Autoclose
  16. Appendix
    1. Resources, How to get support for Perl ?
    2. Recommended Books
  17. More about files
    1. Exercise: Create a counter
    2. Exercise: Create multiple counters
    3. Exercises: List old logfiles
    4. Solution: Create a counter
    5. Solution: Create multiple counters
    6. Solutions: List old logfiles
  18. Testing Demo for Perl
    1. Testing Demo AUT
    2. Testing Demo using Test::More (success)
    3. Testing Demo using Test::More (failure)
    4. Testing Demo - Test coverage report
  19. File processing
    1. Filehandle in scalar and list context
    2. slurp mode
    3. Diamond operator
    4. File::Slurp
  20. Other
    1. Read CSV file as array of hashes
    2. Sort array using sort and sort_by
    3. Range iterator
    4. Benchmark
    5. Bubble sort
    6. Insert sort
    7. Merge sort
    8. Quicksort
    9. Timsort
    10. Traverse directory tree
    11. Traverse directory tree with call back
    12. Linear search in unorderd array
    13. Binary search in sorted array
    14. Convert curl command with -F to LWP::UserAgent
    15. Modify time anomality in two files