in reply to Changing string in specific line/position in a file

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.

  • Comment on Re: Changing string in specific line/position in a file

Replies are listed 'Best First'.
Re^2: Changing string in specific line/position in a file
by onemojofilter (Novice) on Oct 31, 2022 at 18:00 UTC
    Thanks! I'll check it out.