D
David Filmer
I want to be able to save the values of a hash of hashes (of hashes of
hashes, actually) to a textfile and be able to restore the hash (at a later
time) by reading the textfile.
If it were a simple hash, it would be trivial to save/reload the key/value
pairs. But a hash of hashes (of hashes of hashes) doesn't lend itself to
such a trivial solution. I could do a "brute force" approach, drilling down
to each value and saving it in an expected order (and restore it in a
brute-force approach in the same order) but that doesn't seem very elegant
(in fact, it's downright ghastly).
I would appreciate a suggestion as to how I might accomplish this in an
elegant fashion.
Thanks!
hashes, actually) to a textfile and be able to restore the hash (at a later
time) by reading the textfile.
If it were a simple hash, it would be trivial to save/reload the key/value
pairs. But a hash of hashes (of hashes of hashes) doesn't lend itself to
such a trivial solution. I could do a "brute force" approach, drilling down
to each value and saving it in an expected order (and restore it in a
brute-force approach in the same order) but that doesn't seem very elegant
(in fact, it's downright ghastly).
I would appreciate a suggestion as to how I might accomplish this in an
elegant fashion.
Thanks!