The MLDBM perl module can be used to store multidimensional hash structures in tied hashes (including DBM files). . It depends on the Data::Dumper module and by default uses the SDBM tied hash. But you can use it with DB_File (and others DBM modules). You can also use other serializing packages like Storable and FreezeThaw.