http://www.perlmonks.org?node_id=70780

nurikochan has asked for the wisdom of the Perl Monks concerning the following question:

Hello. First Post to perlmonks.org, and whatnot. Hope you can help me...

Okay, I have a little bit of a problem. I need to store a complex data structure in a DBM file. It consists of an array of annonymous hashes. Here's an example of the data structure:

@yes_it_must_be_a_list = ( { 'value1' => "dada", 'value2' => "yadayada", } { 'value1' => "another value", 'value3' => "Ha! A different value than from the last hash!", } )

Any way I can store this in a DBM file? I've tried rewriting it as a hash so I can use an MLDBM file, but it would require a total rewrite of a couple thousand line program, and my attempts totally broke the program.

Anyone know how I could do this?