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


in reply to Multi-line comments in perl code?

Hi mrguy123,

Yes, you can.see you have to give some name and end with cut.Eg.
=comment A hash named $requestParams is created containing all the data needed for the http transaction. This data is then stored in $self->RequestParams, and no further data is needed. =cut
Thanks and Regards,
madtoperl

Replies are listed 'Best First'.
Re^2: Multi-line comments in perl code?
by xdg (Monsignor) on Jul 13, 2006 at 13:28 UTC

    Even though the Perl parser sees that as Pod and ignores it, it's important to advise people that it's not proper Pod and may behave unexpectedly with some Pod parsers now or in the future. For a single paragraph (no blank lines), a Pod =for directive would work as well (though with slightly more to type.)

    =for comment A hash named $requestParams is created containing all the data needed for the http transaction. This data is then stored in $self->RequestParams, and no further data is needed. =cut

    -xdg

    Code written by xdg and posted on PerlMonks is public domain. It is provided as is with no warranties, express or implied, of any kind. Posted code may not have been tested. Use of posted code is at your own risk.

      Thanks a ton :) I am a beginner in Perl and i use a lot of comments while learning how to use Perl.It was easy in java to add comments. But in Perl i didn't know how to add multi-lined comments. Thanks again!
Re^2: Multi-line comments in perl code?
by Anonymous Monk on Oct 09, 2011 at 11:53 UTC
    Thanks it really helped a lot