Introduction to Perl6

Gabor Szabo


Table of Contents
1. About Perl Training Israel
2. Introduction
2.1. Self Introduction - Who am I ?
2.2. Self Introduction - Who are you ?
3. Virtual Box setup
4. Introduction to Perl 6
4.1. Disclaimer
4.2. Getting started
4.3. Other resources
4.4. Installing Rakudo
4.5. Development Environment
4.6. Running Rakudo
4.7. Hello World
4.8. Comments
4.9. POD - Plain Old Documentation
5. First steps in Perl6
5.1. Hello World - scalar variables
5.2. Hello World - interpolation
5.3. Reading from the keyboard
5.4. Numerical operations
5.5. Add
5.6. String operators
5.7. String repetition
5.8. if statement - comparing values
5.9. Naked if statement
5.10. Other forms of the if statement
5.11. Ternary Operator
5.12. Comparison Operators
5.13. Boolean expressions (logical operators)
5.14. Chained comparisons
5.15. Comparing values - Calculator
5.16. Calculator - given
5.17. String functions: index
5.18. String functions: substr
5.19. Super-or (junctions)
6. Files in Perl6
6.1. exit, warn, die
6.2. Read line from file
6.3. Process a file line by line
6.4. Write to a file
6.5. Open file modes
6.6. Exercise: Print sum of numbers
6.7. Solution
6.8. undef, defined, not
7. Perl6 Lists and Arrays
7.1. List Literals, list ranges
7.2. List Assignment
7.3. Swap two values
7.4. loop over elements of list with for
7.5. Create array, go over elements
7.6. Array elements (create menu)
7.7. Array assignment
7.8. Command line options
7.9. Process CSV file
7.10. join
7.11. Hyper Operators
7.12. slurp
7.13. xx - string multiplicator
8. Perl6 Hashes
8.1. Associative Arrays (Hashes)
8.2. Fetching data from a hash
8.3. Multidimensional hashes
8.4. Count words
8.5. Overview
8.6. slurp
8.7. kv
9. Subroutines in Perl6
9.1. Simple definition with required parameters
9.2. Named parameters
9.3. Subroutines
9.4. No parameter definition - perl 5 style
9.5. Subroutines
9.6. Subroutines
10. Perl 6 Regexes
10.1. Regexes in Perl 6
10.2. Simple matching
10.3. Substitute
11. Junctions in Perl6
11.1. Junctions
11.2. More examples with Junctions
12. Perl5 to Perl6
12.1. Intro
12.2. Hello World
12.3. Scalars
12.4. Arrays
12.5. Hashes
12.6. Control Structures
12.7. Functions
12.8. Files
12.9. Modules, Classes
12.10. Perl 5 to Perl6
13. Shell to Perl6
13.1. Intro
13.2. Unix commands in Perl6
13.3. awk
13.4. cat
13.5. cd in Perl6
13.6. chmod
13.7. chown
13.8. cmp
13.9. compress
13.10. cut
13.11. date
13.12. diff
13.13. df
13.14. dos2unix
13.15. du
13.16. file
13.17. find
13.18. grep
13.19. gzip
13.20. head
13.21. kill
13.22. ln
13.23. ls
13.24. mkdir
13.25. mv
13.26. ps
13.27. popd
13.28. pushd
13.29. pwd
13.30. rmdir
13.31. rm
13.32. sed
13.33. sort
13.34. tail
13.35. tar
13.36. touch
13.37. uniq
13.38. unix2dos
13.39. wc
13.40. who
13.41. zip
13.42. Other UNIX command
14. Object Oriented Perl6
14.1. Simple Point class
14.2. Read/write attributes and accessors
14.3. Class Methods
14.4. Private Attributes
14.5. Method with parameters
14.6. Inheritence of classes
14.7. Classes in Perl 6
15. Old slides
15.1. Why old slides?
15.2. Installing Pugs on Linux
15.3. Building Pugs on Ubuntu
15.4. Running Pugs
15.5. Division
Table of Contents
List of Tables
5-1. Comparison Operators
5-2. Logical operators
List of Examples
4-1. examples/intro/hello_world.p6
4-2. examples/intro/hello_world_oop.p6
4-3. examples/intro/comments.p6
4-4. examples/intro/documentation.p6
5-1. examples/scalars/hello_world_variable.p6
5-2. examples/scalars/hello_world_variable_interpolation.p6
5-3. examples/scalars/read_stdin.p6
5-4. examples/scalars/numerical_operators.p6
5-5. examples/scalars/add.p6
5-6. examples/scalars/string_operators.p6
5-7. examples/scalars/concat.p6
5-8. examples/scalars/string_repetition.p6
5-9. examples/scalars/if.p6
5-10. examples/scalars/naked_if.p6
5-11. examples/scalars/ternary.p6
5-12. examples/scalars/comparison_operators.p6
5-13. examples/scalars/logical_operators.p6
5-14. examples/scalars/chained_comparison.p6
5-15. examples/scalars/calculator.p6
5-16. examples/scalars/calculator_given.p6
5-17. examples/scalars/string_functions_index.p6
5-18. examples/scalars/string_functions_substr.p6
5-19. examples/scalars/junctions.p6
6-1. examples/files/exit.p6
6-2. examples/files/warn_die.p6
6-3. examples/files/read_one_line.p6
6-4. examples/files/read_file.p6
6-5. examples/files/write_file.p6
6-6. examples/numbers.txt
6-7. examples/files/statistics.p6
7-1. examples/arrays/list_literals.p6
7-2. examples/arrays/lists.p6
7-3. examples/arrays/arrays.p6
7-4. examples/arrays/list_colors_array.p6
7-5. examples/arrays/color_menu.p6
7-6. examples/arrays/array_assignment.p6
7-7. examples/arrays/color_menu_option.p6
7-8. examples/arrays/process_csv_file.csv
7-9. examples/arrays/process_csv_file.p6
7-10. examples/arrays/join.p6
7-11. examples/arrays/hyper.p6
7-12. examples/files/slurp_file.p6
7-13. examples/arrays/xx.p6
8-1. examples/hash/create_hash.p6
8-2. examples/hash/print_hash.p6
8-3. examples/hash/count_words.p6
8-4. examples/hash/hash.p6
8-5. examples/files/slurp_csv_file.p6
8-6. examples/phonebook.txt
8-7. examples/hash/print_hash_kv.p6
9-1. examples/subroutines/required_params.p6
9-2. examples/subroutines/required_params_named.p6
9-3. examples/subroutines/named_definitions.p6
9-4. examples/subroutines/optional_params.p6
9-5. examples/subroutines/definitions.p6
9-6. examples/subroutines/fibonacci.p6
9-7. examples/subroutines/multiple_same_name_params.p6
10-1. examples/regex/simple.p6
10-2. examples/regex/special_chars.p6
10-3. examples/regex/substitute.p6
11-1. examples/junctions/intro.p6
11-2. examples/junctions/operators.p6
11-3. examples/junctions/substr.p6
11-4. examples/junctions/j.p6
11-5. examples/junctions/x.p6
11-6. examples/junctions/any.p6
12-1. examples/p526/hello_world.p6
12-2. examples/p526/scalars.p6
12-3. examples/p526/arrays.p6
12-4. examples/p526/hashes.p6
12-5. examples/p526/control_structures.p6
12-6. examples/p526/functions.p6
12-7. examples/p526/files.p6
12-8. examples/p526/modules.p6
14-1. examples/classes/point_01.p6
14-2. examples/classes/point_02.p6
14-3. examples/classes/point_03.p6
14-4. examples/classes/point_04.p6
14-5. examples/classes/point_05.p6
14-6. examples/classes/point_06.p6
14-7. examples/oop/class.p6
15-1. examples/scalars/divide.p6