Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Block comment in Perl 1

Status
Not open for further replies.

Segfault7375

Programmer
Jul 13, 2001
23
US
Is there a way to do block comments in Perl?

Like the following snippet in C:

Code:
/*
Whole lots of
comments
go here
*/

 
There actually is somewhat of a way to do that.

If you look in modules, you will see documentation at the bottom of the module that looks something like this:

[tt]
=head1 DESCRIPTION

The C<B> module supplies classes which allow a Perl program to delve
into its own innards. It is the module used to implement the
&quot;backends&quot; of the Perl compiler. Usage of the compiler does not
require knowledge of this module: see the F<O> module for the
user-visible part. The C<B> module is of use to those who want to
write new compiler backends. This documentation assumes that the
reader knows a fair amount about perl's internals including such
things as SVs, OPs and the internal symbol table and syntax tree
of a program.
[/tt]

The =head1 Description thing is what allows for a multiline comment. Its not generally used to make multiline comments in a regular perl script, but can be used.

Though, generally, you will just have to use the shell comment.

Hope this helps.

-Vic vic cherubini
krs-one@cnunited.com
====
Knows: Perl, HTML, JavScript, C/C++, PHP, Flash
====
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top