Skip to content

Commit edd409c

Browse files
authored
Split 5to6 section into 3 paragraphs (#4559)
* Arrow op: directs to => and shrunk. * Arrow op continues
1 parent 325d5ae commit edd409c

File tree

1 file changed

+10
-7
lines changed

1 file changed

+10
-7
lines changed

doc/Language/5to6-perlop.rakudoc

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -44,13 +44,16 @@ my $list = (1,); # a List in a scalar container
4444

4545
=head2 The arrow operator
4646

47-
As you typically will not be using references in Raku, the arrow is
48-
probably less useful as a dereferencing operator. If you do need to
49-
dereference something, however, the arrow is the dot. It is also the dot
50-
for method calls. So, Perl's C«$arrayref->[7]» becomes
51-
C<$arrayref.[7]> in Raku and, similarly, C«$user->name» becomes
52-
C<$user.name>. The C«=>» arrow is used for constructing L<C<Pair>|/type/Pair>s, see
53-
L<Pair term documentation|/language/terms#Pair>.
47+
For the Perl C«=>» arrow, see the
48+
L<Comma operator|/language/5to6-perlop#Comma_operator>.
49+
50+
The dereferencing operator, C«->», is replaced by the dot, which is
51+
also used for method calls. So Perl's C«$arrayref->[7]» becomes
52+
Raku's C<$arrayref.[7]> and C«$user->name» becomes C<$user.name>.
53+
Note that dereferencing is rare in Raku.
54+
55+
Raku uses the C<->> to attach L<Signatures|/language/Signature> to
56+
L<Blocks|/language/Block>.
5457

5558
=head2 Auto-increment and auto-decrement
5659

0 commit comments

Comments
 (0)