in reply to RE: Re: Any_DBM_File blues.
in thread Any_DBM_File blues.
So it looks like, since you don't have those other DBM packages, you must be using SDBM_File, since it's guaranteed to be there (it comes w/ Perl, according to the AnyDBM_File manpage).
So with that in mind, I was able to get this to work correctly, using SDBM_File. Add this line near the top of your file:
to import the file creation/read-write flags; and modify your tie line to look like this:use Fcntl;
Which, if you look at the SDBM_File docs, matches up with what the tie line should look like. This works for me.tie %database, 'AnyDBM_File', "bar", O_RDWR|O_CREAT, 0666 or die "doh + $!\n";
BTW, $DB_HASH, in the context of DB_File, is a special constant telling DB_File to use its DB_HASH package. It's the default for DB_File.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
RE: RE: RE: Re: Any_DBM_File blues.
by skazat (Chaplain) on May 02, 2000 at 20:08 UTC |