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
.
- Calls the
gist
method on its arguments. - Adds a newline character.
- Converts the result to UTF-8.
- 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: English • Deutsch • Español • Italiano • Latviešu • Nederlands • Български • Русский • Українська