Beefy Boxes and Bandwidth Generously Provided by pair Networks
DiBona Syntactic Confectionery Delight  How can I remove
everything between two lines in a file?  ( #48631=categorized
question: print w/ replies, xml ) Need Help?? Contributed by
Anonymous Monk on Dec 28, 2000 at 20:31 UTC Q&A  > files   I
have two lines, lets say "-line1-" and "-line2-" and between
these lines I have some lines. The amount and the content of
these lines are unknown. Like this: some lines -line1- lineA:
xxx lineB: y lineC: zz -line2- more lines So, I want to remove
everything between "-line1-" and "-line2-", in this case lines
A, B and C. How can I do this?  Answer: Removing everything
between two lines contributed by merlyn  See perlfaq "How can I
pull out lines between two patterns that are themselves on
different lines?".     • Please read these before you post! —
        For:     Use:     & &amp;     < &lt;     > &gt;     [
&#91;     ] &#93;   • Log In?      What's my password?
Create A New User     and the web crawle