in reply to GDBM files

Your problem is that the default is for the tie DB_File call to create a new file. The following excerpt is taken from the DB_File docs:
tie %A, "DB_File", "filename" ;
is equivalent to:
tie %A, "DB_File", "filename", O_CREAT|O_RDWR, 0666, $DB_HASH ;
Try it without the implied O_CREAT argument:
tie (%HASH, "DB_File", $filename, O_RDWR) or die "Can't open $filename +: $!\n";

Replies are listed 'Best First'.
(Ovid) RE(2): GDBM files
by Ovid (Cardinal) on Jul 25, 2000 at 03:13 UTC
    Thanks for the info. Now it gives the following very helpful error message:
    Can't open trans.gdbm:
    What's that? Is $! undef all of a sudden? Sigh. I'll keep pluggin' away.
RE: RE: GDBM files
by DrManhattan (Chaplain) on Jul 25, 2000 at 22:15 UTC

    Nah, O_CREAT is just "Create the file if it doesn't exist." I'd say the real problem is that DB_File doesn't support GDBM files. :)

    Try GDBM_File instead. It's part of the default perl5 distribution (though it won't be installed unless you have the appropriate GDBM libraries and include files.)

    -Matt