Copyright; Table of Contents; Preface; The Aim of This Book; The History of This Book; Conventions Used in This Book; Using Code Examples; O'Reilly Safari; How to Contact Us; Acknowledgments; Contributor List; Part I. Starting with the Basics; Chapter 1. The Way of the Program; What Is a Program?; Running Perl 6; The First Program; Arithmetic Operators; Values and Types; Formal and Natural Languages; Debugging; Glossary; Exercises; Chapter 2. Variables, Expressions, and Statements; Assignment Statements; Variable Names; Expressions and Statements; Script Mode; One-Liner Mode.
Text of Note
Checking TypesMulti Subroutines; Debugging; Glossary; Exercises; Chapter 6. Iteration; Assignment Versus Equality; Reassignment; Updating Variables; The while Statement; Local Variables and Variable Scoping; Control Flow Statements (last, next, etc.); Square Roots; Algorithms; Debugging; Glossary; Exercises; Chapter 7. Strings; A String Is a Sequence; Common String Operators; String Length; Searching for a Substring Within the String; Extracting a Substring from a String; A Few Other Useful String Functions or Methods; String Traversal with a while or for Loop; Looping and Counting.
Text of Note
Integer Division and ModuloBoolean expressions; Logical Operators; Conditional Execution; Alternative Execution; Chained Conditionals; Nested Conditionals; if Conditionals as Statement Modifiers; Unless Conditional Statement; for Loops; Recursion; Stack Diagrams for Recursive Subroutines; Infinite Recursion; Keyboard Input; Program Arguments and the MAIN Subroutine; Debugging; Glossary; Exercises; Chapter 5. Fruitful Subroutines; Return Values; Incremental Development; Composition; Boolean Functions; A Complete Programming Language; More Recursion; Leap of Faith; One More Example.
Text of Note
Order of OperationsString Operations; Comments; Debugging; Glossary; Exercises; Chapter 3. Functions; Function Calls; Functions and Methods; Math Functions; Composition; Adding New Functions (a.k.a. Subroutines); Definitions and Uses; Flow of Execution; Parameters and Arguments; Variables and Parameters Are Local; Stack Diagrams; Fruitful Functions and Void Functions; Function Signatures; Immutable and Mutable Parameters; Functions and Subroutines as First-Class Citizens; Why Functions and Subroutines?; Debugging; Glossary; Exercises; Chapter 4. Loops, Conditionals, and Recursion.
Text of Note
Regular Expressions (Regexes)Using Regexes; Building your Regex Patterns; Literal Matching; Wildcards and Character Classes; Quantifiers; Anchors and Assertions; Alternation; Grouping and Capturing; Adverbs (a.k.a. Modifiers); Exercises on Regexes; Putting It All Together; Extracting Dates; Extracting an IP Address; Substitutions; The subst Method; The s/search/replace/ Construct; Using Captures; Adverbs; Debugging; Glossary; Exercises; Chapter 8. Case Study: Word Play; Reading from and Writing to Files; Reading Word Lists; Exercises; Search; Words Longer Than 20 Characters (Solution).
0
8
8
8
8
SUMMARY OR ABSTRACT
Text of Note
If you want to learn how to program and think like a computer scientist, this practical guide will get you started on your programming journey with Perl 6, the new version of the popular programming language. Ideal for beginners, Think Perl 6 contains numerous exercises with multiple solutions and a lot of code examples.