in reply to Re^2: Is something wrong with the below Script??
in thread Is something wrong with the below Script??

You might find seek helpful, and in particular this bit:

Due to the rules and rigors of ANSI C, on some systems you have to do a seek whenever you switch between reading and writing.

update: You should also think about what will happen to your file if you write directly to your original file and your modified string is shorter or longer than the original.

  • Comment on Re^3: Is something wrong with the below Script??