in reply to
regex on previous lines
File::ReadBackwards
might make things easier for you.
Perl 6 - the future is here, just unevenly distributed
Comment on
Re: regex on previous lines
In Section
Seekers of Perl Wisdom