http://www.perlmonks.org?node_id=931293


in reply to Finding a Block of Text in a Larger Block of Text

Have a look at the input record separator in perlvar for a hint on how to read the "larger file" as records.