in reply to Print a previous to previous of a matching line

Put  my $previous_line; at the top, and then assign to  $previous_line some place that it makes sense, and then when you want to do the printing, I forget

Replies are listed 'Best First'.
Re^2: Print a previous to previous of a matching line
by ag88 (Novice) on Oct 08, 2013 at 09:23 UTC

    I want to get a line previous to a previous line. In short words 2nd previous line to a matching line.

      yes, the answer is the same