in reply to Help on file comparison

You could tie your datastructures to disk entities rather than trying to hold them all in memory, but that may be too lightweight for your ultimate goals. I don't know what you'll be doing with the data, and how long you need to hold onto it. But your problem may be a good candidate for a database.

With a relational database such as MySQL (or many others), you could create a table of user ID's and card-members, and another table of ID's and account numbers. In one table your id's will be primary (and unique) keys. In your second table the primary unique key will be account numbers (since presumably one account number cannot belong to more than one ID. Your ID's have a 1:1 relationship with individuals. Your ID's have a 1:M relationship (one to many) with account numbers. Your account numbers have a M:1 relationship (Many to one) with ID's. It would obviously make more sense if I could draw a relationship sketch.

The database solution would be interacted with using DBI, or Class::DBI, the latter of which would provide an object oriented model for your database.


Dave