Beautiful Perl feature: "heredocs", multi-line strings embedded in source code
A piece of "heredoc" data can appear anywhere in a Perl expression. It starts with an initial operator written either << or <<~. The second variant with an added tilde ~, available since Perl v5.26, introduces an indented heredoc, where initial spaces on the left of each line are automatically removed by the interpreter.
Empty string as delimiter
The delimiter string can also be .. an empty string! In that case the heredoc content ends at the next empty line; this is an elegant way to minimize noise around the data.
Several heredocs can start on the same line, as in this example:
my @blogs = $dbh->selectall_array(<<~END_OF_SQL, {}, split(/\n/, <<~END_OF_BIND_VALUES));
March 30, 2026 at 10:47:38 AM EDT
*
FILLER