├── .gitignore ├── AUTHORS ├── LICENSE ├── README.md ├── chapter ├── bn0.pl6 ├── bn1.pl6 ├── bn2.pl6 ├── bn3.pl6 ├── bn4.pl6 ├── bn5.pl6 ├── bn6.pl6 ├── self0.pl6 ├── text0.md ├── text1.md ├── text2.md ├── text3.md ├── text4.md ├── text5.md └── text6.md └── table-of-content.md /.gitignore: -------------------------------------------------------------------------------- 1 | chapter/notes*.txt 2 | chapter/*~ 3 | *~ 4 | *# 5 | -------------------------------------------------------------------------------- /AUTHORS: -------------------------------------------------------------------------------- 1 | 2 | Herbert Breunung 3 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | http://creativecommons.org/licenses/by-sa/4.0/ 2 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # problem_solver_tutorial 2 | 3 | * extensive Perl 6 tutorial covers all major language parts, 4 | * building step by step (chapter by chapter) an useful application, 5 | * has parallel Perl 5 tutorial under [bitbucket](https://bitbucket.org/lichtkind/perl-tut-problemsolver) 6 | * [start reading](/table-of-content.md) 7 | * published under the [license](/LICENSE) CC BY-SA 4.0 8 | * written by [Authors](AUTHORS) 9 | -------------------------------------------------------------------------------- /chapter/bn0.pl6: -------------------------------------------------------------------------------- 1 | use v6; 2 | 3 | say 'Result: ', EVAL( prompt 'Your Math Question? ' ); -------------------------------------------------------------------------------- /chapter/bn1.pl6: -------------------------------------------------------------------------------- 1 | use v6; 2 | 3 | my $file = 'notes1.txt'; 4 | my $notes = ''; 5 | $notes = slurp $file if $file.IO.r; 6 | 7 | say $notes; 8 | my $answer = prompt 'Write a new note? (Just for no and - to delete) '; 9 | 10 | if $answer eq '-' { $notes = '' } 11 | elsif $answer.chars > 0 { $notes ~= $answer ~ "\n" } 12 | else { exit } 13 | 14 | spurt $file, $notes; # write notes into a file -------------------------------------------------------------------------------- /chapter/bn2.pl6: -------------------------------------------------------------------------------- 1 | use v6; 2 | 3 | my $file = 'notes2.txt'; 4 | my @note; 5 | @note = lines $file.IO if $file.IO.r; 6 | 7 | say 'Press h and for help, just to exit.'; 8 | loop { 9 | loop (my $index = 0; $index <= @note.end; $index++) { 10 | say $index, ' : ', @note[$index]; 11 | } 12 | 13 | my $answer = prompt 'Write a new note? '; 14 | last if $answer.chars == 0; 15 | 16 | my $command = substr( $answer, 0, 1); 17 | my $new_note = substr( $answer, 1); 18 | 19 | given lc $command { 20 | when ' ' { push @note, $new_note } 21 | when 'a' { push @note, $new_note } 22 | when 'p' { unshift @note, $new_note } 23 | when 'r' { splice @note, +$new_note, 1 24 | if 0 <= +$new_note and +$new_note < +@note } 25 | when 'd' { @note = (); } 26 | default { say 'first letter: [ ] or [a]ppend (msg), [p]repend (msg),' ~ 27 | "m, [r]emove (nr), [d]elete " 28 | } 29 | } 30 | } 31 | 32 | spurt $file, join("\n", @note); 33 | -------------------------------------------------------------------------------- /chapter/bn3.pl6: -------------------------------------------------------------------------------- 1 | use v6; 2 | 3 | my $file = 'notes3.txt'; 4 | my @note = $file.IO.r ?? lines $file.IO !! (); 5 | 6 | say 'Press h and for help, just to exit.'; 7 | loop { 8 | for @note.kv -> $index, $note { say $index, ' : ', $note } 9 | 10 | given prompt 'Write a new note? ' { 11 | when '' { last } 12 | when 'da' { @note = () } 13 | when /^ \s+ (.+)/ { push @note, $0 } 14 | when /^ a \s* (.+)/ { push @note, $0 } 15 | when /^ p \s* (.+)/ { unshift @note, $0 } 16 | when /^ r \s* (\d+)/ { splice @note, $0, 1 if 0 <= $0 < +@note } 17 | when /^ i \s* (\d+)\:(.+)/ { splice @note, $0, 0, $1 if 0 <= $0 <= +@note } 18 | when /^ c \s* (\d+)\:(.+)/ { @note[$0] = $1 if 0 <= $0 < +@note } 19 | when /^ m \s* (\d+)\:(\d+)/ { 20 | if 0 <= $0 < +@note and 0 <= $1 < +@note { 21 | splice( @note, $1, 0, splice( @note, $0, 1)); 22 | } 23 | } 24 | default { 25 | say q:to/END/; 26 | general format: <1 letter = command> ... 27 | append : note ... or 28 | append : a note ... 29 | prepend: p note ... 30 | insert : i pos:note 31 | change : c pos:note 32 | move : m pos:newpos 33 | remove : r pos 34 | delete : da (delete all) 35 | END 36 | } 37 | } 38 | } 39 | 40 | spurt $file, join("\n", @note); 41 | -------------------------------------------------------------------------------- /chapter/bn4.pl6: -------------------------------------------------------------------------------- 1 | use v6; 2 | 3 | my $file = 'notes4.txt'; 4 | my @note = (); 5 | if $file.IO.r { 6 | for lines $file.IO -> $line { 7 | push @note, { content => $line } 8 | } 9 | } 10 | 11 | my token msg { .+ } 12 | my token pos { \d+ } 13 | my token bump { <.ws> [ \: | \. | \| ] <.ws>} 14 | 15 | say 'Press h and for help, just to exit.'; 16 | loop { 17 | for @note.kv {say "$^index : $^note "} 18 | 19 | given prompt 'Write a new note? ' { 20 | when '' { last } 21 | when 'da' { @note = () } 22 | when /^\s <.ws> / { push @note, { content => $ } } 23 | when /^ a <.ws> / { push @note, { content => $ } } 24 | when /^ p <.ws> / { unshift @note, { content => $ } } 25 | when /^ r <.ws> / { splice @note, $, 1 if $ ~~ 0 ..^ +@note} 26 | when /^ c <.ws> / { @note[] = $ if $ ~~ 0 ..^ +@note } 27 | when /^ i <.ws> / { 28 | splice @note, $, 0, { content => $ } if $ ~~ 0 .. +@note 29 | } 30 | when /^ m <.ws> / { 31 | if $[0] ~~ 0 ..^ +@note and $[1] ~~ 0 ..^ +@note { 32 | splice( @note, $[1], 0, splice( @note, $[0], 1)); 33 | } else { say 'index outside list range'} 34 | } 35 | default { 36 | say q:to/END/; 37 | general format: <1 letter = command> ... 38 | append : note ... or 39 | append : a note ... 40 | prepend: p note ... 41 | insert : i pos:note 42 | change : c pos:note 43 | move : m pos:newpos 44 | remove : r pos 45 | delete : da (delete all) 46 | END 47 | } 48 | } 49 | } 50 | 51 | spurt $file, join("\n", map { $_ }, @note); 52 | -------------------------------------------------------------------------------- /chapter/bn5.pl6: -------------------------------------------------------------------------------- 1 | use v6; 2 | 3 | my $file = 'notes5.txt'; 4 | my Hash @note = read_notes( $file ); 5 | 6 | 7 | my token msg { .+ } 8 | my token pos { \d+ } 9 | my token bump { <.ws> [ \: | \. | \| ] <.ws>} 10 | 11 | say 'Press h and for help, just to exit.'; 12 | loop { 13 | for @note.kv {say "$^index : $^note "} 14 | 15 | given prompt 'Write a new note? ' { 16 | when '' { last } 17 | when 'da' { @note = () } 18 | when /^\s <.ws> / { create_note(@note, $) } 19 | when /^ a <.ws> / { create_note(@note, $) } 20 | when /^ p <.ws> / { create_note(@note, $, 0) } 21 | when /^ r <.ws> / { splice @note, $, 1 if $ ~~ 0 ..^ +@note } 22 | when /^ c <.ws> / { @note[] = $ if $ ~~ 0 ..^ +@note } 23 | when /^ i <.ws> / { create_note($, $) } 24 | when /^ m <.ws> / { 25 | if $[0] ~~ 0 ..^ +@note and $[1] ~~ 0 ..^ +@note { 26 | splice( @note, $[1], 0, splice( @note, $[0], 1)); 27 | } else { say 'index outside list range'} 28 | } 29 | default { 30 | say q:to/END/; 31 | general format: <1 letter = command> ... 32 | append : note ... or 33 | append : a note ... 34 | prepend: p note ... 35 | insert : i pos:note 36 | change : c pos:note 37 | move : m pos:newpos 38 | remove : r pos 39 | delete : da (delete all) 40 | END 41 | } 42 | } 43 | } 44 | 45 | write_notes( $file, @note); 46 | 47 | 48 | 49 | sub create_note ( Hash @note, $msg, Int $pos? = @note.elems){ 50 | if $pos ~~ 0 ..^ +@note { splice @note, $pos, 0, { content => $msg } } 51 | else { say 'index outside the array range' } 52 | } 53 | 54 | sub read_notes ($file --> Array[Hash] ) { 55 | my Hash @note = (); 56 | if $file.IO.r { create_note(@note, $_ ) for lines $file.IO } 57 | return @note; 58 | } 59 | 60 | sub write_notes ($file, Hash @note) { 61 | spurt $file, join("\n", map { $_ }, @note); 62 | } -------------------------------------------------------------------------------- /chapter/bn6.pl6: -------------------------------------------------------------------------------- 1 | use v6; 2 | 3 | my $file = 'notes6.txt'; 4 | my @note = (); 5 | if $file.IO.r { 6 | for lines $file.IO -> $line { 7 | push @note, { content => $line } 8 | } 9 | } 10 | 11 | my token msg { .+ } 12 | my token pos { \d+ } 13 | my token bump { <.ws> [ \: | \. | \| ] <.ws>} 14 | 15 | say 'Press h and for help, just to exit.'; 16 | loop { 17 | for @note.kv {say "$^index : $^note "} 18 | 19 | given prompt 'Write a new note? ' { 20 | when '' { last } 21 | when 'da' { @note = () } 22 | when /^\s <.ws> / { push @note, { content => $ } } 23 | when /^ a <.ws> / { push @note, { content => $ } } 24 | when /^ p <.ws> / { unshift @note, { content => $ } } 25 | when /^ r <.ws> / { splice @note, $, 1 if 0 <= $ < +@note } 26 | when /^ c <.ws> / { @note[] = $ if 0 <= $ < +@note } 27 | when /^ i <.ws> / { splice @note, $, 0, $ if 0 <= $ <= +@note } 28 | when /^ m <.ws> / { 29 | if 0 <= $[0] < +@note and 0 <= $[1] < +@note { 30 | splice( @note, $[1], 0, splice( @note, $[0], 1)); 31 | } 32 | } 33 | default { 34 | say q:to/END/; 35 | general format: <1 letter = command> ... 36 | append : note ... or 37 | append : a note ... 38 | prepend: p note ... 39 | insert : i pos:note 40 | change : c pos:note 41 | move : m pos:newpos 42 | remove : r pos 43 | delete : da (delete all) 44 | END 45 | } 46 | } 47 | } 48 | 49 | spurt $file, join("\n", map( { $_ }, @note) ); 50 | -------------------------------------------------------------------------------- /chapter/self0.pl6: -------------------------------------------------------------------------------- 1 | use v6; 2 | 3 | say slurp $?FILE; 4 | -------------------------------------------------------------------------------- /chapter/text0.md: -------------------------------------------------------------------------------- 1 | 2 | 3 | [Chapter 0](../table-of-content.md) 4 | =================================== 5 | 6 | 7 | * [goals](#goals) and [methods](#teaching-method) 8 | * [what app to build](#what-app-to-build) 9 | * [chapter layout](#chapter-layout) 10 | * [prerequisites](#prerequisites) 11 | * [Perl philosophy](#perl-philosophy) 12 | * [basic syntax rules](#basic-syntax-rules) 13 | * [first tiny example: hello math !](#first-example) 14 | 15 | 16 | 17 | [Goals](#chapter-0) 18 | ------------------- 19 | 20 | Welcome, 21 | to this hands on tour through the more often needed parts of this vast and 22 | beautiful programming language. You can find here: 23 | 24 | - syntax knowledge 25 | - bits of deeper understanding for the design decisions 26 | - room for own experiments 27 | - a hopefully useful application 28 | - a taste of the full capabilities of Perl 6 29 | - sources for further learning (docs and more) 30 | 31 | 32 | 33 | [Teaching Method](#chapter-0) 34 | ----------------------------- 35 | 36 | While action takes place between "you and your computer", we try to give you 37 | the feel that someone is guiding you in a real-world programming situation. 38 | We think that this will be way more human, interesting and educational, 39 | than "talking in class room about driving cars". 40 | You will be able to follow a train of thought from the first strategic decisions, 41 | to the selection process of finding the most suitable Perl feature, to the 42 | following trying out of several ways to formulate it, up to the polishing edits. 43 | A final evaluation helps to understand, what has been achieved. 44 | 45 | That sounds like lot of text - but we actually try to keep it concise as possible. 46 | Links to more detailed information will be provided on the spot needed. 47 | The tutorial also advances with a rather fast pace. Therefore we encourage you to 48 | reread a chapter or paragraph, if you felt like not fully understanding it. 49 | Or you follow the trail of code snippets in a chapter. Running them as oneliner, 50 | and and using them ot the main program as basis of explorations might be your 51 | favorite learning style. Rereading a chapter after that also clarifies a lot. 52 | When an explanation still doesn't makes sense to you - please let us know via github. 53 | 54 | The flip side of this practical, yet dense approach: you (mostly) have to stick 55 | with the given order and won't be able to skip even several sentences without 56 | risking to miss the introduction of an important feature, which will be premised 57 | over and over. This is especially true during chapter 2-6 and an inevitable 58 | side effect of developing one example program throughout the whole tutorial. 59 | While we strongly recommend to adapt it to your wishes, you should be be aware, 60 | that maintaining your modifications through the chapter can be a demanding task. 61 | 62 | 63 | 64 | [What App To Build](#chapter-0) 65 | ------------------------------- 66 | What kind of program could be valuable to many and also highlights Perls strengths? 67 | I think a note manager! Yes there are plenty ones out there, but we can do a very 68 | versatile one, can serve as a todo-list or vocabulary trainer or plainly as a tool, 69 | that helps you not getting lost in information overflow. 70 | 71 | Sifting through all sort of data and especially text, building complex 72 | data structures with easy 73 | manages information you found interesting 74 | that help you to 75 | - because information overload is an issue 76 | 77 | does that. It might sound like a boring Yet another 78 | ..., but organizing our stuff is something we all face as soon we have more than 79 | one 80 | 81 | ---- 82 | !!! from here on the text is in raw state !!! 83 | ---- 84 | 85 | useful 86 | textinfo age 87 | keep organized 88 | multi purpose 89 | 90 | 91 | 92 | [Chapter Layout](#chapter-0) 93 | ---------------------------- 94 | 95 | The practical needs of the growing application shaped the content and ordering 96 | of the chapter, sometimes even overruling the educational intents of the author. 97 | Nonetheless there is a golden thread and the menu (table of contents) as the 98 | index show where to find what. 99 | 100 | Every chapter has a main topic and several (mostly 6), often related subtopics. 101 | Together they allow to bring the program to a new stage, introducing a new 102 | feature set or a new style of programming. The source code in each stage is 103 | included (see table of content). Numbers in file names refer to a chapter. 104 | 105 | Each chapter has several paragraphs. They correspond to the subheadings in the table 106 | of content and cover only a single command, operator or another language feature. 107 | Usually they have just the right length to be read in 5 to 10 minutes. 108 | After that the tutorial can be easily put aside. 109 | 110 | Chapters are also optimized for reading them in one swoop. The first paragraph(s) 111 | are commonly an easy read - a warm up to get accustomed to the topic. 112 | The most challenging part is iusually n the middle, while the end serves as a 113 | fade out and for recap. 114 | 115 | 116 | 117 | [Prerequisites](#chapter-0) 118 | -------------------------- 119 | 120 | - curiosity: 121 | - few programming basics: 122 | What are variables or statements - things of that nature. 123 | Even computer science terms are used, they get introduced in common English. 124 | So a keen mind is whats really needed. 125 | - Rakudo: just check http://rakudo.org/how-to-get-rakudo/ 126 | - any shell: 127 | to run the scripts (unless you can do it from inside the editor) 128 | - any editor but a P6 highlighing have: 129 | - an open browser connected to the net 130 | 131 | 132 | 133 | [Perl Philosophy](#chapter-0) 134 | ----------------------------- 135 | 136 | The big banner of Perl was always TIMTOWDTI: There Is More Than One Way To Do It! 137 | Larry Wall realized: it is impossible to forsee all situations you may encounter. 138 | Therefore providing overlapping choices how to solve your issue is a good thing. 139 | But good choices are based on lots of thought and/or experience. That means: 140 | You get treated as an adult (your views are taken seriously) and you have to act 141 | as an adult (learn and consider consequences). 142 | 143 | One way Perl 6 differs greatly from Perl 5: it has better training wheels. 144 | Even the second slogan went already: "Keep the easy stuff easy" - a lot of 145 | improvements were done in this field. Every day matters require less fumbling 146 | and knowledge and the necessary commands are named very straight forward. 147 | Special cases were eliminated ruthlessly and replaced with recurring principles. 148 | You will get surprisingly far in Perl with a very limited subset of the language. 149 | 150 | However the full sentence goes: "Keep the easy stuff easy and hard possible." 151 | All the heavy weapons are still there and some new, more powerful ones. 152 | It includes full access to many detail workings, including all the internals, 153 | allowing you to mold Perl 6 into whatever can imagine. 154 | As a safeguard many of these possibilities need some extra wording and a syntax, 155 | that is signaling its harmful potential. 156 | 157 | The hardest part of the second slogan is the word "and". Main challenge for the 158 | designers was it to create a language that is very supportive and forgiving to 159 | beginners and yet at the same time not dumbed down, but powerful and expressive. 160 | As we know from experience: pushing a dent into a waterbed, makes the water just 161 | bulge all other places. Analogous: if you forbid komplex commands, your program 162 | gets complex in different ways, if its the nature of the problem you try to solve. 163 | For instance: we could forbid power an multiplication and reduce "2 to the power 164 | of 2" into 2 + 2. Nice and simple. But reducing "27 to the power of 9" into sums - 165 | you easily loose overview and get trapped in wearing and repetitive tasks. 166 | So it actually helps you to write easy to to understand code if you take your time, 167 | learning what power is. 168 | 169 | The creator of Perl believe in the joy of experimenting and learning and that 170 | programming can be a vocation, a work of love which is only if fulfilling, 171 | if your free to follow you intuition and also the desire when to learn what. 172 | 173 | Being a fusion of passion and logic - Perl 6 employs inwardly many principles 174 | and concepts from computer science. On the outside, however, it appears almost 175 | like a human language. It not only borrows many words from simple English like 176 | use, do, whenever, take ... and so forth, it also tries to get the use and feel 177 | of a natural language - allowing you to express yourself to the computer in the 178 | way you do the rest of the day. 179 | 180 | 181 | 182 | [Basic Syntax Rules](#chapter-0) 183 | -------------------------------- 184 | Mostly under Unix type operating systems like Linux, Irix, MaxOS and BSD you 185 | can call text files like binary programs. 186 | 187 | Every Perl 6 program starts 188 | ---- 189 | !!! from here on the text is in raw state !!! 190 | ---- 191 | #!/path/to/perl6 192 | `use v6;` 193 | new line 194 | semicolon 195 | white space 196 | braces 197 | slashes 198 | 199 | 200 | 201 | [First Example](#chapter-0) 202 | -------------------------- 203 | 204 | not explaining details 205 | 206 | 207 | `say 'Result: ', EVAL prompt 'Your Math Question? ';` 208 | 209 | `say slurp $?FILE;` 210 | 211 | 212 | [^chapter start^](#chapter-0) 213 | 214 | [^^table of content^^](../table-of-content.md) 215 | 216 | -------------------------------------------------------------------------------- /chapter/text1.md: -------------------------------------------------------------------------------- 1 | 2 | 3 | [Chapter 1](../table-of-content.md) 4 | =================================== 5 | 6 | 7 | * [scalar variables](#scalar-variables) 8 | * single ('') and double ("") quoting 9 | * string context and concatenation `~` 10 | * shell IO: `say`, `prompt` 11 | * file IO: `slurp`, `spurt` and test op 12 | * conditionals: `if`, `elsif`, `else`, as statement modifier too 13 | * comparison ops: `>`, `eq` 14 | * `exit` main program 15 | 16 | 17 | 18 | [Scalars Variables](#chapter-1) 19 | ------------------------------- 20 | 21 | 22 | 23 | [^chapter start^](#chapter-1) 24 | 25 | [^^table of content^^](../table-of-content.md) -------------------------------------------------------------------------------- /chapter/text2.md: -------------------------------------------------------------------------------- 1 | 2 | 3 | [Chapter 2](../table-of-content.md) 4 | =================================== 5 | 6 | 7 | * array variables 8 | * file IO: `lines` 9 | * string manipulation: `lc`, `substr`, `join` 10 | * comparison op `==` 11 | * loops: `loop` (both uses) 12 | * conditionals: `given`, `when`, `default` 13 | * numeric context: `+` 14 | 15 | 16 | 17 | [^Up^](#chapter-2) 18 | 19 | -------------------------------------------------------------------------------- /chapter/text3.md: -------------------------------------------------------------------------------- 1 | 2 | 3 | [Chapter 3](../table-of-content.md) 4 | =================================== 5 | 6 | 7 | * ternary op: `?? !!` 8 | * chained comparisons 9 | * loops: `for`, `last` 10 | * pointy block syntax `->` 11 | * regular expression with `^`, `.`, `\s`, `\d`, `*`, `+`, `()` 12 | * positional capture variables 13 | * heredoc's with `q`, `to` 14 | 15 | 16 | $/[0] $()/[0] $0 17 | style for first, last easy to overlook 18 | 19 | 20 | 21 | [^Up^](#chapter-3) 22 | -------------------------------------------------------------------------------- /chapter/text4.md: -------------------------------------------------------------------------------- 1 | 2 | 3 | [Chapter 4](../table-of-content.md) 4 | =================================== 5 | 6 | 7 | * hash variables 8 | * anonymous hashes for nested structure (AoH) 9 | * regex with named captures 10 | * named capture variables 11 | * list manipulation with `map` 12 | * smartmatch `~~` 13 | * ranges (`..`) using `^` 14 | 15 | 16 | $/[0] $()/[0] $0 17 | style for first, last easy to overlook 18 | 19 | $/ aka $ 20 | 21 | when /^ r \s* ()/ { splice @note, $/[0], 1 if 0 <= $/[0] < +@note } 22 | when /^ r \s* +/ { splice @note, $/<[0], 1 if 0 <= $/[0] < +@note } 23 | 24 | my token pos { \d+ } 25 | 26 | 27 | 28 | 29 | [^Up^](#chapter-4) 30 | 31 | -------------------------------------------------------------------------------- /chapter/text5.md: -------------------------------------------------------------------------------- 1 | 2 | 3 | [Chapter 5](../table-of-content.md) 4 | =================================== 5 | 6 | 7 | * subroutines 8 | * types and nested types 9 | * self made subtypes 10 | * signatures with (return) types 11 | * optional parameter with default values 12 | * write and use modules 13 | * exporting and improting from a module 14 | 15 | 16 | 17 | [^Up^](#chapter-5) 18 | 19 | -------------------------------------------------------------------------------- /chapter/text6.md: -------------------------------------------------------------------------------- 1 | 2 | 3 | [Chapter 6](../table-of-content.md) 4 | =================================== 5 | 6 | 7 | * object and classes 8 | * methods 9 | * multi method dispatch (MMD) 10 | 11 | 12 | 13 | 14 | [^Up^](#chapter-6) 15 | -------------------------------------------------------------------------------- /table-of-content.md: -------------------------------------------------------------------------------- 1 | #Perl 6 for problem solver 2 | 3 | + [Chapter 0](/chapter/text0.md) ..................... [Main Program](/chapter/bn0.pl6), [Selfprinter](/chapter/self0.pl6) 4 | - [goals](/chapter/text0.md#goals) - [methods](/chapter/text0.md#teaching-method) - [built app](/chapter/text0.md#what-app-to-build) - [layout](/chapter/text0.md#chapter-layout) - [prerequisites](/chapter/text0.md#prerequisites) 5 | - [Perl philosophy](/chapter/text0.md#perl-philosophy) - [basic syntax](/chapter/text0.md#basic-syntax-rules) - [first example](/chapter/text0.md#first-example) 6 | + [Chapter 1](/chapter/text1.md) ..................... [Main Program](/chapter/bn1.pl6) 7 | - scalars - quoting - tilde - shell IO - file IO - conditionals - comparison - exit 8 | + [Chapter 2](/chapter/text2.md) ..................... [Main Program](/chapter/bn2.pl6) 9 | + [Chapter 3](/chapter/text3.md) ..................... [Main Program](/chapter/bn3.pl6) 10 | + [Chapter 4](/chapter/text4.md) ..................... [Main Program](/chapter/bn4.pl6) 11 | + [Chapter 5](/chapter/text5.md) ..................... [Main Program](/chapter/bn5.pl6) [Notebook Module](/chapter/Notebook5.pm6) 12 | + [Chapter 6](/chapter/text6.md) ..................... [Main Program](/chapter/bn6.pl6) 13 | + [Chapter 7](/chapter/text7.md) ..................... [Main Program](/chapter/bn7.pl6) 14 | + Chapter 8 15 | + Chapter 9 16 | + Chapter 10 17 | + Chapter 11 18 | + Chapter 12 19 | 20 | 21 | 22 | 23 | Just click on links, clicking on headings brings you one level up. 24 | 25 | --------------------------------------------------------------------------------