in reply to Deleting records from an array

You've already got some answers, but this caught my eye:

I seriously can't think of any other way to process the file I'm looking at ... I have ... an array that contains a number of records

Does the array consist of the lines of the file? If so, perhaps there is a solution to this in which you could process the file line-by-line without having to read the whole thing into memory...

Also, this sounds like the kind of thing that a database might be able to solve natively?

Maybe you could show us some sample data - a few lines of the input file and/or a few of your records.