in reply to efficient way to read a file in reverse
It's pure Perl, you could even copy the rather short code into a module of yours.
If you wanna implement it yourself I'd try reading sliding windows˛ of 4^n kb chunks from the end with seek
I'd put all the logic into a sub which returns those lines or maybe I'd try to create a new IO class.
I remember a similar question not too long ago, you should try super search °
°) like Reading the contents of a file from the bottom up
Cheers Rolf
(addicted to the Perl Programming Language :)
Wikisyntax for the Monastery
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: efficient way to read a file in reverse
by hippo (Archbishop) on Jan 06, 2021 at 14:06 UTC | |
|
Re^2: efficient way to read a file in reverse
by cmcl (Novice) on Jan 06, 2021 at 17:16 UTC | |
by LanX (Saint) on Jan 06, 2021 at 17:25 UTC |