in reply to Commenting out script in Perl like in C++
There are probably three approaches to multiline comments that I can think of at the moment.
using POD
This one is part of the Perl language itself. it is fully documented in perlpod manual. You would do it like this:
.... some code .... =pod multiline comment (or just code that you don't want to be executed) =cut ...some more code...Working around with if (0) {...}
This is juat a workaround, where you place the code in a if block that is never executed (you can't put just any text there, because it is Perl code after all). However, you specifically asked for commenting out of Perl code, so this might be applicable to you
...some code... if (0) { ...some code commented out... } ...some more code...use ACME::Comment
There is a module ACME::Comment that let's you use any kind of commenting style you want. This example is taken straight from it's documentation:
use Acme::Comment type=>'C++', own_line=>1; /* if (ref $mod) { $bar->{do}->blat(msg => 'blarg'); eval { i'm sooo sick of this time for some coffee */ // I prefer beer. --sqrn
Hope this helps.
In Section
Seekers of Perl Wisdom