Skip to content

Commit

Permalink
weaken Perl 6 is better claim and warn about use of say
Browse files Browse the repository at this point in the history
  • Loading branch information
stmuk committed Jul 9, 2018
1 parent 0fc864a commit 1909912
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions doc/Language/101-basics.pod6
Expand Up @@ -6,7 +6,8 @@
Perl originated as a programming language intended to gather and summarize
information from text files. It's still strong in text processing, but Perl 5
is also a powerful general-purpose programming language. Perl 6 is even better.
is also a powerful general-purpose programming language. We think Perl 6 can
be even better.
Suppose that you host a table tennis tournament. The referees tell you the
results of each game in the format C<Player1 Player2 | 3:2>, which means
Expand Down Expand Up @@ -352,7 +353,7 @@ on the result of the second sort, and stores the final list in C<@sorted>.
=end code
=head3 X<C<say>> and X<C<print>>
=head3 X<C<say>>, X<C<print>> and X<C<put>>
To print out the players and their scores, the code loops over C<@sorted>,
setting C<$n> to the name of each player in turn. Read this code as "For each
Expand All @@ -361,6 +362,9 @@ following block." C<say> prints its arguments to the standard output (the
screen, normally), followed by a newline. (Use C<print> if you don't want the
newline at the end.)
Note that C<say> will truncate certain data structures by calling the C<.gist>
method so C<put> is safer if you want exact output.
=head3 X<C<interpolation>>
When you run the program, you'll see that C<say> doesn't print the contents of
Expand Down

1 comment on commit 1909912

@lizmat
Copy link
Collaborator

@lizmat lizmat commented on 1909912 Jul 9, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

Please sign in to comment.