大型多行字符串很难编写。
my $variable = <<'EOF'; this block of text is interpreted literally, no \'quotes matter, they're just text only the trailing left-aligned EOF matters. EOF
注意:确保忽略堆栈溢出语法突出显示器:这是非常错误的。
插值Heredocs的工作方式相同。
my $variable = <<"I Want it to End"; this block of text is interpreted. quotes\nare interpreted, and $interpolations get interpolated... but still, left-aligned "I Want it to End" matters. I Want it to End
在5.26.0 *中待处理是“ Indented Heredoc”语法,可为您修剪左填充
my $variable = <<~"MuchNicer"; this block of text is interpreted. quotes\nare interpreted, and $interpolations get interpolated... but still, left-aligned "I Want it to End" matters. MuchNicer