I wasn't able to replicate your results. I ran the snippet provided on the MLDBM man page, adding "qw(DB_File)" as needed, and used the resulting hash file as input for your snippet -- no errors. When I added "use Data::Dumper" and "print Dumper(...)" (as in the man page code), the output was as expected.
Maybe you should check that your MLDBM and Data::Dumper modules are both up-to-date?