in reply to what is the best method to read and write in a file in perl

The easist way is not to read from and write to the same file at all. Instead open a second file for writing, copy the parts that you don't want to change, and in the end remove the first file, and move the second file to the previous location of the first file.
Perl 6 - links to (nearly) everything that is Perl 6.
  • Comment on Re: what is the best method to read and write in a file in perl