dbm problems/questions (msdos-perl). 
Author Message
 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




Sat, 04 Mar 1995 19:46:16 GMT  
 dbm problems/questions (msdos-perl).

: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???

That's because you don't have enough stuff in it yet.  Add more the
the assoc array, and eventually it will have some size.

--tom
--

    echo "ICK, NOTHING WORKED!!!  You may have to diddle the includes.";;
            --Larry Wall in Configure from the perl distribution



Sat, 04 Mar 1995 22:17:55 GMT  
 dbm problems/questions (msdos-perl).

Quote:

>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???
[...]
>Hmm .., what's going wrong (what I am doing wrong?) ?

There is nothing wrong.  The GNU-dbm library, which is what is probably
used by the Perl version you are using,  stores all data in the .pag
file.  The .dir file is not used.  Under Unix the two files are linked
together in order to keep their timestamps synchronised.  Under MS-DOS
the .dir file is just a dummy zero-length file.

Diomidis
--

Department of Computing, Imperial College, London SW7     #include "/dev/tty"



Sat, 04 Mar 1995 21:58:31 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Perl for MSDOS - some problems/questions

2. Is there a MSDOS Perl w/ Gnu-DBM

3. Perl for Msdos questions.

4. MSDOS perl questions

5. Perl in Win3.1 or MSDOS - I have questions

6. Problem compiling perl under msdos

7. Problem with msdos perl system function

8. Incredibly silly question warning (MSDOS BigPerl)

9. msdos prompt keyboard problem

10. problem in msdos 'formats'

11. Problem with MSDOS 3.0.41 version

12. Problem passing parameters through MSDOS/Windows batch file

 

 
Powered by phpBB® Forum Software