in reply to Re^2: Search between pattern and append
in thread Search between pattern and append

Yes, it is possible that I could devise a "one-liner", but WHY?
I can also write code use the flip-flop operator, but WHY?
Your situation is not the ideal case for the flip-flop.

There is significant overhead in invoking Perl. There is no difference if the Perl program is expressed as one line or 20 lines.

Why are you obsessed with a "one-liner" solution? This has no performance basis.

Does my code accomplish your desired behaviour? If not, then why not?

  • Comment on Re^3: Search between pattern and append

Replies are listed 'Best First'.
Re^4: Search between pattern and append
by Anonymous Monk on Jul 13, 2018 at 18:29 UTC
    I am not a technical person. I can just copy and paste the one liner.
      Save my code as process.pl. Change <DATA> to just <> with a text editor. Save file. On unix, you will have to mark this file as "executable". You will have ask your colleagues for further details about how to do that.