To start with, I'm very sorry, but I really don't have any vendetta against you (nor against any other monk here for that matter). Maybe some people around here do, I don't know for sure, but not me.

My post was very factual: besides being syntactically wrong, the code you posted (once fixed) wasn't going to do what the OP was asking for. That's it. Nothing to add. Period.

I would have stopped here if it weren't for your response.

But your answer calls for additional comments.

Don't make yourself yourself a victim of others. Here, my personal opinion was that your code was wrong, and I explained in which respects I thought your code suggestion was wrong. Leaving aside the syntax mistakes, you code (if fixed syntactically) doesn't do what what the OP asked for. I only reported that fact. Maybe, after all, I was wrong and your code was right (I really don't think so), but your answer just complains about people not being nice with you, but does not actually discuss in any way my objections to your code.

Now, I would add that, since in your initial post you insisted quite a bit on thorough testing, perhaps you could check at the very least whether your code could compile flawlessly (I am willing to suppose and accept that: perhaps, you misunderstood the OP's original intent). If you can't do it, at least, ask one of your boys to do it for you.

I am sure that I have made once in a while silly mistakes in code samples I have posted here or on some other forums; in that case, I would say: "Sorry, I made a mistake," or, maybe, "Sorry, not enough coffee this morning," or some other sentence trying to apologize, or whatever. But, at least, I would recognize my mistake and not accuse people of doing that to me because they don't like me.

In the case in point, even the Perl compiler appears not to like you--or rather what you write. Yeah, maybe you've got a good reason to become paranoid. Even machines are against you. Or, perhaps, you should question yourself.

Finally, I have serious doubts about whether you actually know Perl. Your syntax mistakes are glaring. "//" instead of "#" for comments, "false" and "true" for Boolean values, that's pretty damning. Yes, you should learn that "false" has a true value.

Oh, and BTW, I agree with haukex and don't see "the very-obvious bug" in the OP's code (but I do see several in yours), but that's secondary to what I want to say here.

Yes, there are probably monks around here who don't like you, or, rather, don't like what you write. But ask yourself: maybe they have some good reasons for that.


In reply to Re^2: [Solved]Need to extract a particular block of lines between two patterns by Laurent_R
in thread [Solved]Need to extract a particular block of lines between two patterns by chengchl

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.