in reply to Re: pure perl tail revisited
in thread pure perl tail revisited

Thanks for showing me that splice trick. I don't think it took anything off the benchmark times, but it removed the temp array I was using. When I do tailz t.dat 5 | wc -l I get 5. (Just lucky). perl -le'print "a"x5000 for 1..10' > t.dat does give bad results The code still depends on you knowing your max line length beforehand, but I think this is true for more logs and text files. I'm happy now, at least I figured out what Merlyn meant when he said there was a faster method than Tie::File or File::ReadBackwards.