By using this site, you agree to our Privacy Policy and our Terms of Use. Close
fkusumot said:
phil said:
This shouldn't be too difficult in perl. You could create a hash with that identifier as the hash keys and the data as the values associated with the keys and then do a split. Loading 1.3 million lines like that from a flat text file would probably blow, though, especially if you had to do it over and over again. Since it's static, why dont you convert it into some sort of binary database file? SQLite would probably work really well here and would simplify the code to a series of SQL queries.

So you would make a hash table for every single possibility? That sounds very innefficient.


It is inefficient. I guess you don't have to populate an entire hash/array(I may have misinterpreted how your data is present in the file), but your program is still going to be insanely inefficient because you're searching through 1.3 million records in a flat text file, so you probably wouldn't notice much difference unless the record you're looking for happens to be near the top of the file.