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.


Examine what is said, not who speaks.
"Efficiency is intelligent laziness." -David Dunham
"When I'm working on a problem, I never think about beauty. I think only how to solve the problem. But when I have finished, if the solution is not beautiful, I know it is wrong." -Richard Buckminster Fuller