Welcome to the Monastery, indieBoy!
Please take the time to skim the Guide to the Monastery and the PerlMonks FAQ, specifically Posting on PerlMonks, to get started. Read at least Markup in the Monastery and How do I post a question effectively?
It is good practice to post one's current attempt at solving a problem. Showing one's effort makes it more likely to get help, since The Monastery isn't a "code writing service" ;-)
That said - use a Flip-Flop:
my $pat = qr{Summary \w+\(\w\)}; while(<DATA>) { if (/$pat/ ... /$pat/) { next if /$pat/; print; } } __END__ gargantua pantagruel Summary 1000(1) top Date .... Column1 Col2 Col3 bottom Summary xxx(x) foo bar baz
Output:
top Date .... Column1 Col2 Col3 bottom
See perlop, there binary "..."
update: added greeting
In reply to Re: extract lines between same pattern
by shmem
in thread extract lines between same pattern
by indieBoy
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |