Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re: Better ways to make multi-line comments in Perl?

by mendeepak (Scribe)
on Feb 21, 2012 at 05:33 UTC ( [id://955224] : note . print w/replies, xml ) Need Help??


in reply to Better ways to make multi-line comments in Perl?

you can use head-cut like this

=head my $test="hello"; do not disturb this is a comment print $test; =cut

Replies are listed 'Best First'.
Re: Answer: Better ways to make multi-line comments in Perl?
by JavaFan (Canon) on Feb 21, 2012 at 07:33 UTC
    Actually, that is not a comment. It's a piece of the manual page, and will show up when someone uses perldoc.

    If one insists on abusing the documentation to write comments, at least make it so that it won't show up:

    =begin I_do_not_care_about_documenting This is not a comment. This is not a comment. This is not a comment. This is not a comment. This is not a comment. This is not a comment. This is not a comment. This is not a comment. This is not a comment. This is not a comment. This is not a comment. This is not a comment. =end I_do_not_care_about_documenting