Skip to content

Commit

Permalink
Deletes last reference to Perl 5
Browse files Browse the repository at this point in the history
I have actually left the reference when talking about `use v6`. In
fact, it happens to me from time to time, and there's no way to
explain what it does other than referencing this.

I agree with @stmuk that it shouldn't be moved. It serves its purpose,
which is to serve as an introduction *for anyone*, not for Perl 5
users now that all those references have been eliminated. This closes #2191
  • Loading branch information
JJ committed Aug 12, 2018
1 parent cd5e7a1 commit 318d8a8
Showing 1 changed file with 10 additions and 14 deletions.
24 changes: 10 additions & 14 deletions doc/Language/101-basics.pod6
Expand Up @@ -9,7 +9,7 @@ the results of each game in the format C<Player1 Player2 | 3:2>, which
means that C<Player1> won against C<Player2> by 3 to 2 sets. You need a
script that sums up how many matches and sets each player has won to
determine the overall winner.
 
The input data (stored in a file called C<scores.txt>) looks like this:
=for code :lang<data>
Expand Down Expand Up @@ -149,13 +149,11 @@ the declared variable as an C<Array>. Arrays store ordered lists.
=head3 X<C<hash>>
These two lines of code declare two hashes. The C<%> sigil marks each
variable as a C<Hash>. A C<Hash> is an unordered collection of key-value
pairs. Other programming languages call that a I<hash table>,
I<dictionary>, or I<map>. You can query a hash table for the value that
corresponds to a certain C<$key> with C<%hash{$key}>N<Unlike Perl 5, in
Perl 6 the sigil does not change when accessing an array or hash with
C<[ ]> or C<{ }>. This is called X<I<sigil invariance>>>.
These two lines of code declare two hashes. The C<%> sigil marks each variable
as a C<Hash>. A C<Hash> is an unordered collection of key-value pairs. Other
programming languages call that a I<hash table>, I<dictionary>, or I<map>. You
can query a hash table for the value that corresponds to a certain C<$key> with
C<%hash{$key}>.
In the score counting program, C<%matches> stores the number of matches each
player has won. C<%sets> stores the number of sets each player has won. Both
Expand Down Expand Up @@ -355,12 +353,10 @@ sigil as well as blocks of code in curly braces. Since any arbitrary
Perl code can appear within curly braces, C<Array>s and C<Hash>es may be
interpolated by placing them within curly braces.
Arrays within
curly braces are interpolated with a single space character between each
item. Hashes within curly braces are interpolated as a series of
lines. Each line will contain a key, followed by a tab character, then
the value associated with that key, and finally a newline.
Arrays within curly braces are interpolated with a single space character
between each item. Hashes within curly braces are interpolated as a series of
lines. Each line will contain a key, followed by a tab character, then the value
associated with that key, and finally a newline.
Let's see an example of this now.
Expand Down

0 comments on commit 318d8a8

Please sign in to comment.