in reply to pure perl tail revisited
I covered this issue exhaustively at Performing a tail(1) in Perl (reading the last N lines of a file). You might want to look there for OWTDI. I actually took about tail(1) for the PPT project (see KM's response) to rip the guts out into a module, but at the moment the parts are lying around on the floor.
The idea is that the stand-alone tail program just becomes a fairly simple object instantiation, but then you could also use the module in your own programs.
print@_{sort keys %_},$/if%_=split//,'= & *a?b:e\f/h^h!j+n,o@o;r$s-t%t#u'
|
---|
In Section
Cool Uses for Perl