Irfan Sayed <irfan_sayed2...@yahoo.com> asked: > i am still not able to modify existing lines in the existing file. > here is my code > plz help
It doesn't work that way. Once you open the file for writing, it's truncated and you can't read the old contents from it anymore. Why don't you use a temporary new file for the output? Once your transformation is complete, you would then remove the old file and move the temporary file into its place. HTH, Thomas -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/