You only ever do anything (print the line) for the "header" line of each of your blocks. Two approaches that come to mind:
- Keep reading the file line by line, but implement a small state machine. Start off looking for the release line; once you've seen that look for column values (stashing them off in a hash) until you encounter a blank line. When you get the blank line your "record" is complete, so dump out the output line information you've accumulated (clearing out the state back to a default) and start looking for the next release.
- Since your sample data looks amenable to it, use $/ to read in paragraph mode (see the entry for it in perlvar) and then parse things out from that record text.
The cake is a lie.
The cake is a lie.
The cake is a lie.