We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
chomp
1 parent c8bc721 commit 9c955b1Copy full SHA for 9c955b1
doc/Language/quoting.rakudoc
@@ -562,6 +562,14 @@ some multi line
562
=end code
563
564
I<Heredocs> include the newline from before the terminator.
565
+A common idiom to remove it is to put a L<C<chomp>|/type/Str#routine_chomp> at the beginning, for example:
566
+
567
+=begin code
568
+my $s = chomp q:to/END/;
569
+The result will have
570
+no final newline.
571
+END
572
+=end code
573
574
To allow interpolation of variables use the C<qq> form, but you will then have
575
to escape metacharacters C<\{> as well as C<$> if it is not the sigil for a
0 commit comments