Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

Ok...I can create skiplist db files from scratch no prob. How would one read a skiplist file from disk and go through the values? I tried using tie ala bdb files like on page 387 of the Camel book to no avail...any help would be appreciated.

Replies are listed 'Best First'.
Re: HARD!: reading skiplist db from a file
by tachyon (Chancellor) on Sep 07, 2004 at 23:16 UTC

    A skiplist is a type of data structure like a binary tree, b tree, balanced tree..... Your question is meaningless without the context of *what* created the data structure and serialised it to disk. How do you create the db files from scratch no prob without the ability to read them? I assume it is cyrus related in which case you need to look at cyrusdb_skiplist.c, and RTFS for details on the file format so you can hack together a widget to extract the data. If you want more functionality you are looking a buliding a full blown XS interface to it.

    Unless you have to work with the output of another program you would do far better to use say Berkeley DB via perl.

    cheers

    tachyon

Re: HARD!: reading skiplist db from a file
by jZed (Prior) on Sep 07, 2004 at 21:01 UTC
      Thanks jZed...this was my first recourse. I am a big fan of CPAN. After reading the documentation for this module, you will notice copious information regarding creating skiplists yet none for reading searialized skiplist files to database.