in reply to Better ways to make multi-line comments in Perl?

what about this?
<<#; this is a multiline comment #

cLive ;-)

Replies are listed 'Best First'.
Re: Answer: Better ways to make multi-line comments in Perl?
by abstracts (Hermit) on Jul 29, 2001 at 14:58 UTC
    Hello,

    I have perl-5.6.1 and the above code does not work because after stripping the comments, it looks like:

    << this is a multiline comment
    which is clearly wrong and the compiler complains. To get around this, you need to use something like:
    <<C; this is a comment C
    or, if you really want the hash sign, do:
    <<'#'; this is a comment #
    But in neither case does the code run cleanly and pass warning about "Useless use of a constant in void context".

    Btw, for me, I never really liked multiline comments. Even in C, my comments look like:

    /* * This is a * Multiline * Comment */
    Which looks ugly compared to perl's comments (or ada's even).

    Aziz,,,