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.