in reply to I still can't get only the necessary lines from the file.
open (DATA,"<xxx.txt") || die "Can't open xxx.txt: $!\n"; while(<DATA>) { if (/Start context/ .. /\* Exit context \*/) { print unless /(Start context|\* Exit context \*)/; last if /\* Exit context \*/; } }
|
|---|