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?
In reply to Re^3: Best way to write in Perl
by Corion
in thread Best way to write in Perl
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |