in reply to [Golfing] Uncommenting a block

:) I stick with ctrl+q in scite

Multi-line comments in perl code?, Better ways to make multi-line comments in Perl?, multi line comments?.

Replies are listed 'Best First'.
Re^2: [Golfing] Uncommenting a block
by LanX (Saint) on Apr 14, 2010 at 12:40 UTC
    Thanks, interesting, but my (shortest) approach is not discussed (or only in more verbose versions)

    From what I saw nesting and conditional commenting seem to be of special interest... which can be done with this solution:

    if ($habibi) { print $habibi; <<'' if (0); #forget the following print " talks often much cr*p";<P> $h++ }

    Warning about whitespaces in "empty" lines ending a heredoc seem to be a good application for code filters. (...finally)

    Cheers Rolf

      "empty" lines ending a heredoc have trailing spaces at the end, by definition. perlcritic catches that :).

      --
       David Serrano
       (Please treat my english text just like Perl code, i.e. feel free to notify me of any syntax, grammar, style and/or spelling error. Thank you!).

        > "empty" lines ending a heredoc have trailing spaces at the end, by definition.

        I'm not sure I understand what you mean with "by definition"...(?)

        you're suggesting to use perlcritic?

        I think a feature/syntax/pragma allowing trailing whitespace in Here-Docs would have many advantages.

        (Talking about the "right tool", emacs visualizes trailing whitespaces by default. ;)

        Cheers Rolf