Welcome to the Monastery | |
PerlMonks |
Re: Writing and modifying (change ordelete) a fileby splinky (Hermit) |
on Jul 16, 2000 at 09:06 UTC ( [id://22756]=note: print w/replies, xml ) | Need Help?? |
The short answer is that you have to rewrite the whole file.
You can't modify stuff in place.
The slightly longer answer is that you can modify files in place, but you can't alter the length of the file at all. Of course, Perl makes rewriting the whole file really easy, especially with the -i and -p command-line switches. Something like the following might do what you want:
In Section
Seekers of Perl Wisdom
|
|