in reply to FILE operation in PERL
The very easiest way of doing this is to use Tie::File. It allows you to treat the whole files as an array of lines without requiring the whole file to be in memory.
It effectively does the telling and seeking for you and adds in intelligent buffering to boot.
|
|---|