Course of Raku / Essentials / Functions essentials / Built-in functions for printing

note

The note routine prints its arguments to the standard error stream. In the rest, it is similar to say.

  1. Calls the gist method on its arguments.
  2. Adds a newline character.
  3. Converts the result to UTF-8.
  4. Sends it to the STDERR stream.
my $x = 42;
note "Current value of \$x is $x";

Confirm that this program does not send the message to STDOUT:

$ raku t.raku > /dev/null
Current value of $x is 42

If no argument is passed to note, it prints Noted as the default message.

Course navigation

put   |   Compare say and put


💪 Or jump directly to the exercises in this section.

Translations of this page: EnglishDeutschEspañolItalianoLatviešuNederlandsБългарскиРусскийУкраїнська