develooper Front page | perl.beginners | Postings from November 2022

change one line in a large fine

Thread Next
From:
linuxguy
Date:
November 20, 2022 08:58
Subject:
change one line in a large fine
Message ID:
trinity-d377137f-f8a8-4a8b-91f8-27e32b8e1853-1668934709073@3c-app-gmx-bs51
Hello perl world,

I have a large file which has millions of lines.

They are text only lines.

If I have to change one line in the file, what's the efficient way?

I don't want to slurp the whole file into memory, change that line and write the full content back to disk again.

Thanks.

Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About