in reply to Re^3: Syntax error with use constant and switch with comment between
in thread Syntax error with use constant and switch with comment between

Unnecessary is a matter of opinion really. The fact is that this piece of code behaves differently when a comment is changed and I find this unsettling to say the least. Why wouldn't the first thing a source filter do is remove lines beginning with #?

  • Comment on Re^4: Syntax error with use constant and switch with comment between

Replies are listed 'Best First'.
Re^5: Syntax error with use constant and switch with comment between
by ikegami (Patriarch) on Dec 07, 2009 at 01:34 UTC

    Unnecessary is a matter of opinion really.

    At the time, I was operating under the premise that you could use Perl's switch statement (given/when).

    The fact is that this piece of code behaves differently when a comment is changed and I find this unsettling to say the least.

    I concur

    Why wouldn't the first thing a source filter do is remove lines beginning with #?

    Aside from the fact that it only remove a portion of comments, it would break

    print <<'__EOI__'; ########### # Heading Meow meow meow meow meow meow meow meow meow meow. __EOI__