http://qs1969.pair.com?node_id=913148

Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

Hi Monks,

I have the tera byte file and want to know to parse the file which one of the below process increases the performance

Method 1:
Open the file, read the line by line and do the some calculation and put the result into the other file and once completed all lines in file, close the file.

Method 2:
Open the file, read all content into the one array variable and close the file after read the each line from array after do the calculation and put the result into the file.

Please tell me which is best way to parse the file , otherwise is there any other way to show best performance.

Sorry, for my bad english