Much of what is true for Perl 5 is also true for Raku. Some exceptions:
There are no typeglobs in Raku.
Assigning an array to a scalar variable now makes that scalar variable a reference to the array:
my @y = <A B C D>; # Array of strings 'A', 'B', 'C', and 'D'say @y[2]; # the @-sigil requires the container to implement the role Positional@y[1,2] = 'x','y'; # that's where subscripts and many other things come fromsay @y; # OUTPUT«[A x y D]» # we start to count at 0 btw.my $x = @y; # $x is now a reference for the array @ysay $x[1]; # prints 'x' followed by a newline charactermy Int $with-type-check; # type checks are enforced by the compilermy Int:D $defined-i = 10; # definedness can also be asked for and default values are required in that casemy Int:D $after-midnight where * > 24 = 25; # SQL is fun and so is Rakumy \bad = 'good'; # if you don't like sigilssay bad; # you don't have to use themsay"this is quite bad"; # but then string interpolationsay"this is quite {bad}"# becomes more wordy
Laziness is a big topic in Raku. Sometimes Raku programmers are so lazy, they can't even be bothered with giving variables names.
say ++$; # this is an anonymous state variablesay ++$; # this is a different anonymous state variable, prefix:<++> forces it into numerical context and defaults it to 0
say $+=2 for 1..10; # here we do something useful with another anonymous variablesubfoo { $^a * $^b } # for positional arguments we often can't be bothered to declare them or to give them fancy namessay foo 3, 4;