in reply to Re: write exact lines of file
in thread write exact lines of file

I wouldn't say that using Tie::File is a good advice for this particular problem. Tie::File is rather heavy-weight, in resource usage and time needed to learn its API. Tie::File pays back your investments by giving you some handy functionality, none of which you need for the problem at hand.

It's like suggesting to use XS code to add two numbers. It's not impossible, it gives you lots of control and flexibility, but it doesn't make much sense.

-n and $. are the solutions, not Tie::File.

Abigail