in reply to Re: Reading the contents of a file from the bottom up
in thread Reading the contents of a file from the bottom up
Actually, no need for an API, sort of. There's PerlIO::reverse which lets you just add a layer when opening a file, then use your good ol' Perl API:
open my $fh, "<:reverse", "/etc/passwd"; print for <$fh>;
Like File::ReadBackwards, but unlike the tac command, PerlIO::reverse only does line-by-line reversing though.
|
|---|