Re: [OT] Re: nesting coments

From: Dan Pop (
Date: 04/14/04

Date: 14 Apr 2004 17:39:33 GMT

In <> Leor Zolman <> writes:

>On 14 Apr 2004 13:22:38 GMT, (Dan Pop) wrote:
>>In <> Leor Zolman <> writes:
>>>On Tue, 13 Apr 2004 20:53:30 GMT, Keith Thompson <> wrote:
>>>>Personally, I like comments that extend from a delimiter to the end of
>>>>a line, and cannot cross line boundaries (like Ada's "--", C99/C++'s
>>>>"//", and Perl's "#"). In any decent text editor (both emacs and vi
>>>>qualify), it's easy to comment out or uncomment a range of lines, and
>>>>the comment marker is clearly visible on each line.
>>>I've done a lot of Perl hacking over the past three years, and I've sorely
>>>missed C-style comments. I just now did a Google search and discovered
>>>something that looks like:
>>>blah blah
>>> which I guess comes close to /* ... */. I guess I should have done that
>>>Googling three years ago ;-)
>>That's not a particularly bright idea, either. Some day, you may want to
>>use this Perl feature for its intended purpose (keeping Perl code and its
>>documentation together) and having PODs containing "garbage" will bite
>Anything that would have helped me (during the countless hours of
>debugging I've been doing with Perl scripts) to comment out large sections
>of code easily would have indeed been a "particularly bright idea" (or at
>least a useful one), and saved me much misery.

And you couldn't figure out that Perl's goto was *exactly* what you

    goto end_comment1;

    perl code commented out


By using a consistent naming convention for the label names (as suggested
above) you could immediately tell the difference between a "good" goto
(if you used any in your code) and the ones used for commenting out
large blocks of Perl code.


Dan Pop
DESY Zeuthen, RZ group

Relevant Pages

  • Re: Good Golly Miss Molly Perl. Been so long.
    ... DF> use a goto. ... I can't give an example of Perl code where goto is the best solution, ... The canonical place I've seen goto used in C is to jump to cleanup code ... requires a lot of setup and teardown. ...
  • Re: Could I put commands in a variable
    ... >> routine using a special form of goto() that erases the ... Note that I have never used goto in any perl code, ...
  • Re: [OT] Re: nesting coments
    ... my Perl code is ressembling to my C code. ... If the interpreter complains about syntax errors, ... Dan Pop ...