H
hzzc1012
Hello, everyone:
I'm using quite big data file as large as 1 G bytes, and it contain
many lines, the longest of which will be about 1M byte.
And now I need to read the last 100 lines, for example, from the file
and reverse every character in the line adn then print it in another
file ( for example, 12345000 in the original file will be 00054321 in
the new file.)
Now I read the data file into memory, find the end , and then output
the character reversely to the output file, but I do find it very
memory and time consuming
I am a new comer to PERL, so I am not sure if there would be any other
more efficient solution. And I guess there would be.
Thank you in advance!
Jacobus
I'm using quite big data file as large as 1 G bytes, and it contain
many lines, the longest of which will be about 1M byte.
And now I need to read the last 100 lines, for example, from the file
and reverse every character in the line adn then print it in another
file ( for example, 12345000 in the original file will be 00054321 in
the new file.)
Now I read the data file into memory, find the end , and then output
the character reversely to the output file, but I do find it very
memory and time consuming
I am a new comer to PERL, so I am not sure if there would be any other
more efficient solution. And I guess there would be.
Thank you in advance!
Jacobus