Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris

Re: pure perl tail revisited

by Aristotle (Chancellor)
on Sep 09, 2002 at 16:49 UTC ( #196347=note: print w/replies, xml ) Need Help??

in reply to pure perl tail revisited

Except it won't work if the last X lines add up to more than 2 kbytes..

You need a loop there, and it has to read backwards and pay attention to files smaller than 2k or consisting of less than X lines. Not counting the last EOL if it's the last thing in the file makes things a notch more complicated as well. In total, it's a rather not as trivial a problem as it first seems to be.

Makeshifts last the longest.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://196347]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (5)
As of 2020-04-08 10:19 GMT
Find Nodes?
    Voting Booth?
    The most amusing oxymoron is:

    Results (43 votes). Check out past polls.