in reply to best way to print paragraphs of text

You seem to think that here-doc terminators cannot contain whitespace. You're wrong.
if ($today eq 'Monday') { print <<" OUTPUT"; Today is Monday. Bla bla bla. ... Who knows. MONDAY }
works just fine (but the output will have leading spaces).

Note that in your example, the following works too:

print <<OUTPUT if $today eq 'Monday'; Today is Monday. Bla bla bla. ... Who knows. OUTPUT

Replies are listed 'Best First'.
Re^2: best way to print paragraphs of text
by AnomalousMonk (Archbishop) on Aug 09, 2009 at 04:14 UTC
    You seem to think that here-doc terminators cannot contain whitespace. You're wrong. ... but the output will [still] have leading spaces ...
    I vaguely recall a discussion somewhere of a multi-line string quotation mechanism (perhaps a here-doc?) in which indentation whitespace would or could be automatically removed at compile-time by invoking the right syntactic spell. I don't see anything like this in perlop. Am I imagining things? Was or is this something associated with Perl 6?
      That's indeed a perl6 thing. In perl5, you need to remove the white space yourself. I would guess with Devel::Declare it may be possible to do some kind of auto-leading-white-space-removal, but my knowledge of the optree is too limited to know how.
      my $output = <<" OUTPUT"; Today is Monday. Bla bla bla. ... Who knows. MONDAY OUTPUT $output =~ s/^ //gm; print $output; __END__ Today is Monday. Bla bla bla. ... Who knows. MONDAY