in reply to Inplace editing/ inserting a newline/modify a tab deliminated file

I know that you don't want to slurp the file into an array, but this is really a perfect place to use Tie::File. Even the FAQ says so. It is much faster and memory efficient than slurping, so it isn't really "resorting to assigning the file to an array first and push'in the line in."

HTH.


Edited for Clarity



Code is (almost) always untested.
http://www.justicepoetic.net/
  • Comment on Re: Inplace editing/ inserting a newline/modify a tab deliminated file