http://qs321.pair.com?node_id=561305


in reply to Multi-line comments in perl code?

Analysis of Solutions (Yes = good)
Solution Optimized away Strict friendly Indentable directives Usable mid-statement
my $comment = <<'EOC'; bla bla EOC
No Yes No No
$comment = <<'EOC' if 0; bla bla EOC
Yes No* No No
0 && <<'EOC'; bla bla EOC
Yes Yes No No
0 && q{ ... };
(and variations)
Yes Yes Yes No
=for comment bla bla =cut
Yes Yes No Yes
# bla bla # bla bla # bla bla
Yes Yes Yes Yes

Judgements on readability left to you.

None of the above give warnings.

* — One cannot simply add my because the behaviour or my ... if 0; is undefined, and thus must not be used.