How can I comment out a large block of perl code?

D

Dan Jacobson

$ perldoc -q 'How can I comment out a large block of perl code?' says
to use =begin comment text, =end comment text, but I find the =end
comment text does not stop the comment, printing only "1":
print 1;

=begin comment text

all of this stuff

here will be ignored
by everyone

=end comment text

print 2;

Wait, he meant to say use a =cut instead of =end comment text!

Please report a bug for me, my bugs just go into a black hole.
 
Y

Yury Kopyl

Dan Jacobson -> "How can I comment out a large block of perl code?" :

DJ> $ perldoc -q 'How can I comment out a large block of perl code?'
DJ> says to use =begin comment text, =end comment text, but I find the
DJ> =end comment text does not stop the comment, printing only "1":
DJ> print 1;

DJ> =begin comment text

DJ> all of this stuff

DJ> here will be ignored by everyone

DJ> =end comment text

DJ> print 2;

DJ> Wait, he meant to say use a =cut instead of =end comment text!

I use next construction:

=rem
bla-bla-bla
=cut

Yury Kopyl aka hrg | http://id.totem.ru | [TEAM Nemiroff ?????]
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top