in reply to What is the best way to remove(delete) specific lines from a very large file?

use Tie::File; tie @array, 'Tie::File', "filename" or die "something is wrong: $! \n" +;
But dont try to use scalar @file or something which tries to calculate the size of @array, as that will start loading the whole array in memory . moreover dont use foreach to traverse this array, as that internally calculates the size of array before traversing it, use while instead
  • Comment on Re: What is the best way to remove(delete) specific lines from a very large file?
  • Download Code