dbm problems/questions (msdos-perl).
Hi,
I have fetched PERL419X.ZIP from Simtel and it runs fine. Because I have
no experience with dbm I wrote a simple example using dbmopen(), dbmclose(),
etc.. It works fine, but the [????????.dir] file is only 0 bytes long???
Here some piece of information ..
---------------------------------------------------------------------------
The PERL script, I wrote ...
---------------------------------------------------------------------------
# Simple dbm test (W. Kebsch)
dbmopen(db, 'database', 0666);
$db{'a'} = 'Data(a)';
$db{'b'} = 'Data(b)';
$db{'c'} = 'Data(c)';
dbmclose(db);
dbmopen(db, 'database', 0666);
printf("keys=%d, values=%d\n", $#keys + 1, $#values + 1);
while(($key, $value) = each(db)) {
printf("key=%s, value=%s\n", $key, $value);
}
dbmclose(db);
---------------------------------------------------------------------------
The directory before running the script ...
---------------------------------------------------------------------------
PERL286 EXE 324619 23.02.92 11.20
TDBM PL 399 15.09.92 13.29
---------------------------------------------------------------------------
The output of the command: "C>PERL286 TDBM.PL"
---------------------------------------------------------------------------
keys=3, values=3
key=b, value=Data(b)
key=a, value=Data(a)
key=c, value=Data(c)
---------------------------------------------------------------------------
The directory after running the script ...
---------------------------------------------------------------------------
PERL286 EXE 324619 23.02.92 11.20
TDBM PL 403 15.09.92 13.29
DATABASE PAG 1560 15.09.92 13.32
DATABASE DIR 0 15.09.92 13.32
---------------------------------------------------------------------------
Hmm .., what's going wrong (what I am doing wrong?) ?
Thanks in advance for your help!
Waldemar
--
Waldemar Kebsch, c/o SIEMENS NIXDORF Informationssysteme AG, STO SI 32,
W-4790 Paderborn, Federal Republik of Germany