
Learning Perl 6
Description
Alles über E-Books | Antworten auf Fragen rund um E-Books, Kopierschutz und Dateiformate finden Sie in unserem Info- & Hilfebereich.
More details
Other editions
Additional editions

Content
- Cover
- Copyright
- Table of Contents
- Preface
- The Backstory of Perl 6
- What You Should Already Know
- Getting Rakudo
- How to Use This Book
- How to Get Help
- Conventions Used in This Book
- Using Code Examples
- O'Reilly Safari
- How to Contact Us
- Acknowledgments
- Chapter 1. Introduction
- Why Perl 6?
- First Steps with the REPL
- Reading the Documentation
- Basic Syntax
- Terms
- Operators and Expressions
- Statements
- Blocks
- Comments
- Unspace
- Objects and Classes
- Variables
- Simple Output
- Lexical Scope
- Predefined Variables
- Making and Running a Program
- Summary
- Chapter 2. Number Guessing
- Binding and Assignment
- A MAIN Program
- Program Arguments
- Prompting for Values
- Literal Numbers
- Formatting Numbers
- Numeric Operations
- Conditional Execution
- Boolean Values
- Comparing Things
- Conditional Branching
- Putting It All Together
- Summary
- Chapter 3. Numbers
- Number Types
- Integers
- Type Constraints
- Smart Matching
- Rational Numbers
- Imaginary and Complex Numbers
- Numbers Small and Large
- The Numeric Hierarchy
- Summary
- Chapter 4. Strings
- Literal Quoting
- Escaped Strings
- Adverbs for Quoting
- String Operators and Methods
- Looking Inside Strings
- Normal Form Grapheme
- String Comparisons
- Prompting for Input
- Number to String Conversions
- String to Number Conversions
- Interpolated Strings
- Here Docs
- Shell Strings
- Shell Safety
- Fancier Quoting
- Summary
- Chapter 5. Building Blocks
- Blocks
- Lexical Scope
- Control Structures
- Phasers
- Storing Blocks
- Blocks with Parameters
- Simple Subroutines
- Named Subroutines
- Whatever Code
- Subsets
- Summary
- Chapter 6. Positionals
- Constructing a List
- Iterating All the Elements
- Ranges
- The @ Coercer
- Sequences
- Infinite Lazy Lists
- Gathering Values
- Single-Element Access
- Changing a Single Element
- Multiple-Element Access
- Arrays
- Constructing an Array
- Interpolating Arrays
- Array Operations
- Lists of Lists
- Flattening Lists
- Interesting Sublists
- Combining Lists
- The Zip Operator, Z
- The Cross Operator, X
- The Hyperoperators
- The Reduction Operator
- Filtering Lists
- Transforming a List
- Sorting Lists
- Sorting on Multiple Comparisons
- Summary
- Chapter 7. When Things Go Wrong
- Exceptions
- Catching Exceptions
- Backtraces
- Rethrowing Errors
- Throwing Your Own Exceptions
- Defining Your Own Exception Types
- Failures
- Warnings
- The Wisdom of Exceptions
- Summary
- Chapter 8. Files and Directories, Input and Output
- File Paths
- File Test Operators
- File Metadata
- Linking and Unlinking Files
- Renaming and Copying Files
- Manipulating Directories
- Directory Listings
- Creating Directories
- Removing Directories
- Formatted Output
- Common Formatting Tasks
- The Standard Filehandles
- Standard Output
- Standard Error
- Standard Input
- Reading Input
- Reading Lines
- Reading a File
- Writing Output
- Opening a File for Writing
- Binary Files
- Moving Around
- Writing Binary Files
- Summary
- Chapter 9. Associatives
- Pairs
- Adverbs
- Modifying a Pair
- Maps
- Checking Keys
- Creating from a Positional
- Checking Allowed Values
- Hashes
- Accumulating with a Hash
- Multilevel Hashes
- Summary
- Chapter 10. Using Modules
- Installing Modules
- Loading Modules
- Finding the Module
- Lexical Effect
- Loading a Module at Runtime
- Fetching Data from the Web
- Running Perl 5 in Perl 6
- Summary
- Chapter 11. Subroutines
- A Basic Subroutine
- Extra Arguments
- Explicit Returns
- Recursing
- Iterating Instead of Recursing
- Storing Subroutines in Libraries
- Exporting Subroutines
- Positional Parameters
- Slurpy Parameters
- Have It Both Ways
- Combining Slurpies
- Optional and Default Arguments
- Parameter Traits
- Parameter Constraints
- Same Name, Different Signature
- Literal Value Parameters
- Number of Arguments
- Parameter Types
- Named Parameters
- Required Named Parameters
- Named Parameters for Free
- Mixed Parameters
- Return Types
- Summary
- Chapter 12. Classes
- Your First Class
- Defining Methods
- Private Methods
- Defining Subroutines
- Objects
- Private Attributes
- Public Attributes
- multi Methods
- Inheriting Types
- Checking Inheritance
- Stub Methods
- Controlling Object Creation
- Building Objects
- Tweaking Objects
- Private Classes
- Summary
- Chapter 13. Roles
- Adding Behavior to Classes
- Applying Multiple Roles
- Methods in Roles
- De-Conflicting Roles
- Anonymous Roles
- Summary
- Chapter 14. Junctions and Sets
- Junctions
- any
- all
- one
- none
- Some Junctive Tricks
- Sets
- Set Operations
- Summary
- Chapter 15. Regular Expressions
- The Match Operator
- Match Operator Syntax
- Successful Matches
- Defining a Pattern
- Predefined Patterns
- Matching Nonliteral Characters
- Matching Any Character
- Matching Types of Characters
- User-Defined Character Classes
- Matching Adverbs
- Matching Either Case
- Ignoring Marks
- Global Matches
- Things That Use Patterns
- Substitutions
- Summary
- Chapter 16. Fancier Regular Expressions
- Quantifiers
- Zero or More
- Greediness
- Zero or One
- Minimal and Maximal
- Controlling Quantifiers
- Turning Off Backtracking
- Captures
- Named Captures
- A Capture Tree
- Backreferences
- Surrounders and Separators
- Assertions
- Anchors
- Conditions
- Code Assertions
- Alternations
- First Match
- Longest Token Matching
- Summary
- Chapter 17. Grammars
- A Simple Grammar
- Multiple Rules
- Debugging Grammars
- Grammar::Tracer
- Grammar::Debugger
- A Simple Action Class
- Creating an Abstract Syntax Tree
- Ratcheting
- Parsing JSON
- Parsing CSV
- Adjusting the Grammar
- Using Roles in Grammars
- Summary
- Chapter 18. Supplies, Channels, and Promises
- Supplies
- Multiple Taps
- Live Supplies
- Channels
- Promises
- Waiting for Promises
- Waiting for Multiple Promises
- Managing Your Own Promises
- Promise Junctions
- Reactive Programming
- Reacting in the Background
- Summary
- Chapter 19. Controlling Other Programs
- Quick and Easy
- Quoted Commands
- Safer Commands
- Writing to a Proc
- Procs
- Asynchronous Control
- Summary
- Chapter 20. Advanced Topics
- One-Liners
- Declarator Block Comments
- Feed Operators
- Destructuring Signatures
- Defining Your Own Operators
- Perl 5 Patterns
- Shaped Arrays
- Typed Containers
- NativeCall
- The with Topicalizer
- Chapter 21. Conclusion
- Glossary
- Appendix A. Exercise Answers
- Answers to Preface Exercises
- Answers to Chapter 1 Exercises
- Answers to Chapter 2 Exercises
- Answers to Chapter 3 Exercises
- Answers to Chapter 4 Exercises
- Answers to Chapter 5 Exercises
- Answers to Chapter 6 Exercises
- Answers to Chapter 7 Exercises
- Answers to Chapter 8 Exercises
- Answers to Chapter 9 Exercises
- Answers to Chapter 10 Exercises
- Answers to Chapter 11 Exercises
- Answers to Chapter 12 Exercises
- Answers to Chapter 13 Exercises
- Answers to Chapter 14 Exercises
- Answers to Chapter 15 Exercises
- Answers to Chapter 16 Exercises
- Answers to Chapter 17 Exercises
- Answers to Chapter 18 Exercises
- Answers to Chapter 19 Exercises
- Index
- About the Author
- Colophon
System requirements
File format: ePUB
Copy protection: Adobe-DRM (Digital Rights Management)
System requirements:
- Computer (Windows; MacOS X; Linux): Install the free reader Adobe Digital Editions prior to download (see eBook Help).
- Tablet/smartphone (Android; iOS): Install the free app Adobe Digital Editions or the app PocketBook before downloading (see eBook Help).
- E-reader: Bookeen, Kobo, Pocketbook, Sony, Tolino and many more (not Kindle).
The file format ePub works well for novels and non-fiction books – i.e., „flowing” text without complex layout. On an e-reader or smartphone, line and page breaks automatically adjust to fit the small displays.
This eBook uses Adobe-DRM, a „hard” copy protection. If the necessary requirements are not met, unfortunately you will not be able to open the eBook. You will therefore need to prepare your reading hardware before downloading.
Please note: We strongly recommend that you authorise using your personal Adobe ID after installation of any reading software.
For more information, see our ebook Help page.