in reply to Extract data from next n-th line

Alternately if your records are delimited by blank lines you could diddle $/ and process the whole record at a time.

The cake is a lie.
The cake is a lie.
The cake is a lie.