© Moritz Lenz 2020
M. LenzRaku Fundamentals https://doi.org/10.1007/978-1-4842-6109-5_8

8. Review of the Raku Basics

Moritz Lenz1 
(1)
Fürth, Bayern, Germany
 

In the previous chapters, we discussed some examples interleaved with the Raku mechanics that make them work. Here I want to summarize and deepen the Raku knowledge that we’ve touched on so far, removed from the original examples.

8.1 Variables and Scoping

In Raku, variable names are made of a sigil, $, @, %, or &, followed by an identifier. The sigil implies a type constraint, where $ is the most general one (no restriction by default), @ is for arrays, % is for hashes (associative arrays/maps), and & is for code objects.

Identifiers can contain - and ' characters, as long as the character after ...

Get Raku Fundamentals: A Primer with Examples, Projects, and Case Studies now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.