Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re: Arrays of anonymous hashes in a DBM file?

by repson (Chaplain)
on Apr 08, 2001 at 07:58 UTC ( #70783=note: print w/ replies, xml ) Need Help??


in reply to Arrays of anonymous hashes in a DBM file?

I don't know much about DBM and MLDBM files but I do know a few methods other methods for persistant data structures.

  • Data::Dumper - This module generates a string representation of your data structure like your one above which you can write to a text file and restore with require or eval.
  • Storable - This module serializes your data structure making a binary representation of it and includes functions for storing and retriving from files. It has the advantage over Data::Dumper in that its stored structures use much less disk space.
  • XML::Dumper - This module produces a XML representation of your stucture but since it uses elements such as <HASH> and <ARRAY> it doesn't make much sense from a non-perl perspective.
  • XML::Simple - This module produces a file like XML::Dumper but doesn't use perl conventions/identities/names.
You may want to research these a bit more, but any of them will probably suit most needs with a minimum of hassle.
There are probably more than I can't think of at the moment as well.


Comment on Re: Arrays of anonymous hashes in a DBM file?

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://70783]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (5)
As of 2014-07-24 23:09 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (167 votes), past polls