in reply to Finding the second line an item appears on

Copy-and-paste your search to the line just below it:

do { $_ = <> } until /formulae/; do { $_ = <> } until /formulae/;

Sure, it isn't fancy, but it doesn't rely on any counter variables, either.

----
I wanted to explore how Perl's closures can be manipulated, and ended up creating an object system by accident.
-- Schemer

:(){ :|:&};:

Note: All code is untested, unless otherwise stated