in reply to File output from end to beginning
On the other hand, if file size and memory constraints are an issue, you'd probably want to go through the file line by line, store the bytes offsets (from "tell()") for each, then do a loop consisting of: seek(); $_=<>; print(); going through the offsets in reverse order.open( IN, "file" ); @lines = <IN>; close IN; print reverse @lines;
|
|---|