Welcome to the Monastery | |
PerlMonks |
Re: search-and-replace in filesby tune (Curate) |
on May 20, 2003 at 20:12 UTC ( [id://259563]=note: print w/replies, xml ) | Need Help?? |
You are changing the file only in memory :-)
Write all the lines including changed ones into a variable, and then when you're done with reading the file, open it again for writing. Then write the content of your variable into it. --
In Section
Seekers of Perl Wisdom
|
|