in reply to reading (caching?) large files

does read help? i don't know of any module to do it for you, but that and

($line, $buf) = split "\n", $buf, 2;
seems likely to do the trick.

i actually think that kind of optimization is already done for you, but i may be mistaken.