in reply to Re^2: Hash of Hashes from file
in thread Hash of Hashes from file
Well, the problem is that with a hash, you can only have one value for each key. If you need to associate multiple values per key, then the solution is to store the values in an array, and save the array reference in the hash. If you get to the point where you have more data than you can fit into memory at one time, then you need to look at using a database, like mysql. Instead of pushing the data from each line of the file into your hash, you would insert it into the database, then once all the data is loaded you can query the database.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^4: Hash of Hashes from file
by cipher (Acolyte) on Apr 03, 2012 at 14:31 UTC | |
by scorpio17 (Canon) on Apr 03, 2012 at 15:19 UTC | |
by cipher (Acolyte) on Apr 03, 2012 at 16:01 UTC | |
by scorpio17 (Canon) on Apr 03, 2012 at 18:49 UTC | |
by cipher (Acolyte) on Apr 05, 2012 at 00:53 UTC | |
by Cristoforo (Curate) on Apr 03, 2012 at 20:57 UTC | |
by cipher (Acolyte) on Apr 05, 2012 at 01:12 UTC | |
by Cristoforo (Curate) on Apr 06, 2012 at 02:17 UTC | |
by Cristoforo (Curate) on Apr 06, 2012 at 15:08 UTC | |
|
In Section
Seekers of Perl Wisdom