in reply to GDBM files

This works for me
tie %HASH, 'DB_File', 'trans.gdbm', O_RDWR, 0666, $DB_HASH or die "Can +'t open $filename: $!\n";
As long as the file your trying to open is a Berkeley DB Hash file, otherwise I get the same error that you do. Try running file trans.gdbm and making sure it's the right type of file.
HTH