in reply to Re^2: Weirdness when reading from DBM file
in thread Weirdness when reading from DBM file

*smiles* I'm glad it worked out for you. If you run into any problems with DBM::Deep, please let me know.

As for map, it's conceptually pretty simple. You're used to functions taking a single thing as an argument and returning a single thing as a result. Map takes an action and a list of things as arguments, does the action to each of the things in turn, and returns the list of actioned things as a result.

In the code above, what I'm doing is taking a list of indices and inflating each one into a key-value pair. Then, I'm using the fact that a hash can be assigned a list of key-value pairs to create my hash. Does that help make more sense?


My criteria for good software:
  1. Does it work?
  2. Can someone else come in, make a change, and be reasonably certain no bugs were introduced?
  • Comment on Re^3: Weirdness when reading from DBM file