|
|
| Come for the quick hacks, stay for the epiphanies. | |
| PerlMonks |
Re: Changing string in specific line/position in a fileby Corion (Patriarch) |
| on Oct 31, 2022 at 17:27 UTC ( [id://11147866]=note: print w/replies, xml ) | Need Help?? |
|
Maybe Tie::File is what you want? That allows you to treat a file as if it were an array of lines. In the background, it still needs to rewrite the whole file, because if you change the length of a line while replacing stuff, the rest of the file needs to be adjusted.
In Section
Seekers of Perl Wisdom
|
|
||||||||||||||||||||||||||||||||||