Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re: Multi-line comments in perl code?

by madtoperl (Friar)
on Jul 13, 2006 at 12:41 UTC ( #560928=note: print w/replies, xml ) Need Help??


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

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://560928]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (9)
As of 2020-08-14 13:53 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Which rocket would you take to Mars?










    Results (75 votes). Check out past polls.

    Notices?