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


in reply to Multi-line comments in perl code?

I think it's useful to boil down what's already been said or referred to. The last item may change with Perl6, for "=begin/end", but the rest will probably not. See Apocalypse 2 RFC 5

Here's an example which you can runn with "perl" and with "perldoc" to see what shows up where. Note that in many places, such as before the "=cut", the blank line is part of the syntax.

=head1 tstcmt.pl This is text that shows up with the "perldoc tstcmt.pl" command. The comment sections below do not. =cut print "hello\n"; =for comment This is a single paragraph of comment text, spanning multiple lines. It ends with the first blank line. After that, the text is inuded with other printed pod text that shows up with perldoc This text also shows up with perldoc, it's not part of the "for" comment above. =cut print "hello1\n"; =for comment Another paragraph of comment text, spanning multiple lines. It ends with the first blank line. =cut print "hello2\n"; =begin comment This is a multi-paragraph comment section. Which is terminated by an =end comment on a line by itself. This is a second paragraph =end comment =cut print "hello3\n"; =head2 Other pod documentation This is text that also shows up with the "perldoc tstcmt.pl" command. The comment sections above do not. =cut print "hello4\n"