in reply to Re: Best way to write in Perl
in thread Best way to write in Perl

Hi,
I want to over write data in a.txt.
I am expecting output in a.txt as
Thisisatestline Containsvalues TestingTestinginProgress Currently I am reading a.txt, store those data in an array. Then creating b.txt and replacing NULL and spaces from a.txt. Finally replacing a.txt by b.txt using mv command. Can you please provide best method to handle this?
Thanks

Replies are listed 'Best First'.
Re^3: Best way to write in Perl
by Corion (Patriarch) on Sep 04, 2007 at 06:55 UTC

    This doesn't sound too bad to me. Especially, your solution is safe from errors if your program crashes before the new output has been written completely. Why are you trying to change that?

      Thanks a lot for your help