Is gobbling an entire file into an array considered bad form? My datafile is roughly half a megabyte in size, so I figured memory was not an issue. I can see however that reading the file line by line makes for more scalable code.
What was bugging me about my own code was that I in fact had an N+1 pass approach, where N was the number of duplicated keys. I was reading the file once, and then cycling several times over the array.
calin, you are right about the fact that there can be more than a single duplicate for any textual field, so the code needs to account for this.
Again, thanks for the time the both of you spent looking at my code, it is much appreciated!