in reply to Changing a file?
Regrettably, this is a problem in any language, not necessarily restricted to Perl.
The short answer is, "it depends."
A slightly longer answer is, "read in the file, make approporate changes in memory, and write to a new file, then rename both files when you're done." This approach presumes much about the type of file, what kind of changes you're making, how big the file is, and how much of it you're changing (also where in the file). There are an effectively infinite number of things you might be using the file for and ways you might be using it.
A better anwer to your specific question would be contingent upon more details, including (of course) a code snippet of what you already have done.
dmm
If you GIVE a man a fish you feed him for a day
|
|---|