How to search a file for the last block of consecutive lines that contain a keyword in Perl
问题 Imagine a text file like below where <some random text> could be anything or nothing , implying the KEYWORD can appear anywhere in the line, alone or along with other text: 1 <some random text> 2 <some random text>KEYWORD<some random text> 3 <some random text>KEYWORD<some random text> 4 <some random text> 5 <some random text> 6 <some random text>KEYWORD<some random text> 7 <some random text> 8 <some random text>KEYWORD<some random text> 9 <some random text>KEYWORD<some random text> 10 <some