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

note

The note routine prints its arguments to the standard errors 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

Built-in functions for printing / put   |   💪 Exercises: Built-in functions for printing

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