in reply to More efficient way to exclude footers

What are the typical and maximum values of $numFooters? If it's not too big, maybe you could buffer that many lines?

Also, this may provide some inspiration: How do I read a file line by line in reverse order (from EOF to start of file)

Replies are listed 'Best First'.
Re^2: More efficient way to exclude footers
by babysFirstPerl (Initiate) on Aug 19, 2015 at 14:31 UTC
    $numHeaders and $numFooters probably won't ever exceed 10. The file itself is typically around 6,000 lines. I've thought of reading it in reverse- but then I still have to exclude the headers, so I have the same problem just in the opposite direction.