in reply to output can be displayed in screen, but not in output file

Welcome to the Monestary, happyrainb.

You're trying to modify a file as you're reading it.

You might want to use File::Inplace for this, or maybe Tie::File. If you'd like to do this without modules, you'd probably have to read the whole file in first, modify the variable that has it, and then write it all out again.

  • Comment on Re: output can be displayed in screen, but not in output file