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
In reply to Re: Finding the second line an item appears on
by hardburn
in thread Finding the second line an item appears on
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |