Special characters
Technically speaking, all characters are special in Raku, since they're all just the result of particular mixes of parse rules. Nevertheless, some characters may appear to be more special than others. (However, we will not document any operators here, which contain plenty of odd characters in Raku.)
Sigils:
$ Item
@ Positional
% Associative
& CallableTwigils may occur only after a sigil, and indicate special scoping:
* Dynamically scoped
? Compile-time constant
^ Positional placeholder
: Named placeholder
! Private attribute
. Public attribute/accessor
~ Slang
= Pod data
< Named match from $/Quote characters:
'' Single quotes
"" Double quotes
// Regex
「」 Quotes that allow no interpolation at all
<> Quote words
«» Shell-style wordsEscapes within single quotes:
Escapes within double quotes:
Escapes within character classes and translations include most of the double-quote backslashes, plus:
Escapes within regexes include most of the double-quote escapes, plus:
Note that all non-alphanumeric characters are reserved for escapes and operators in Raku regexes.
Any lowercase backslash escape in a regex may be uppercased to negate it, hence matches anything that is not a newline.
Last updated
Was this helpful?