in reply to reversing files line by line

In other words: You want to reimplement tac in Perl. Why? (Windows is no excuse here, there are also implementations of tac for Windows.)

Alexander

--
Today I will gladly share my knowledge and experience, for there are no sweeter words than "I told you so". ;-)