Here document
Heredocs in Raku use the :to
modifier to a quoting operator, such as q
or qq
. The indentation of the end marker is removed from every line.
Output:
Note that the quotes around the "END" are not magic --- the marker is just a regular string; it's the `q` or `qq` that decides whether or not the heredoc interpolates.
Multiple here docs may be stacked on top of each other.
Output:
Both q and qq are specialised forms of Q which comes with many adverbs. Here a heredoc that only interpolates @-sigils.
Output:
Last updated