Hi,

Perl doesn't have a multiline comment mark.

You can use perldoc marks in order to comment what you want, or include the content in a string, like:

Perldoc style:

=start
Here
are the
lines you
want to comment
=cut

Or using a string:

q/
Here are
the
lines you
want to comment
/;

The program will work fine, but in the second example, if you use

use warnings;

it will tell you that you used this string in a void context.
If you don't like the warning, you could use:

my $zzz = q/
...
/;

The first way is prefered, but the second way allows you to comment one line or more lines using the same syntax.

Octavian

----- Original Message ----- From: "sivasakthi" <[EMAIL PROTECTED]>
To: "beginners perl" <beginners@perl.org>
Sent: Friday, May 16, 2008 12:24 PM
Subject: Multiline comment in Perl


Hi all,


How to comment Multiple lines  in Perl?



Thanks,
Siva





--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/


Reply via email to