linux...@gmx.net writes:
> 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.
It
May i ask a question about reading file?
while(0){ print 'hi' }
Will never print hi.
cat 1.txt:
0
open FH, '1.txt' or die;
while() { print 'hi' }
This will print hi.
Since $_ == 0 here, why while become true?
I am confused about this.
Regards
November 20, 2022, 8:57 PM, "Kang-min Liu"
Hi,
readline will be your friend.
Just have a look in the example mentioned this link:
https://www.tutorialspoint.com/perl/perl_readline.htm
Regards,
Ruprecht
Am 20.11.22 um 15:41 schrieb supp...@openmbox.net:
May i ask a question about reading file?
while(0){ print 'hi' }
Will never
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.
--
To
* linux...@gmx.net [22-11/20=Su 09:58 +0100]:
> 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