in reply to
How regexes fail.
There is a heinous trick you can use that I described at
Re: Regexes on Streams
.
See
File::Stream
for an implementation of the idea.
Comment on
Re: How regexes fail.
In Section
Seekers of Perl Wisdom