![]() |
|
Problems? Is your data what you think it is? | |
PerlMonks |
Re: filesby dmmiller2k (Chaplain) |
on Mar 18, 2002 at 05:10 UTC ( #152406=note: print w/replies, xml ) | Need Help?? |
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 dayBut, TEACH him to fish and you feed him for a lifetime
In Section
Seekers of Perl Wisdom
|
|