in reply to Re: More efficient way to exclude footers
in thread More efficient way to exclude footers
This is a perfect job for Tie::File
How so? It needlessly reads the entire file (except for the ~5 lines of headers and footers) twice!
If that's no problem because the file is small, why didn't you just read the whole thing into memory instead of adding the monstrous overheard of Tie::File to the equation?
If that's a problem because the file is large, use a rolling buffer. I think you'll find that saying it'll make it 10 times faster is an understatement.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: More efficient way to exclude footers
by stevieb (Canon) on Aug 21, 2015 at 04:01 UTC |