Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number

Which xBase module?

by parser (Acolyte)
on Mar 26, 2012 at 21:35 UTC ( #961760=perlquestion: print w/replies, xml ) Need Help??
parser has asked for the wisdom of the Perl Monks concerning the following question:

Hello fellow Monks,

After a few hours of reading on CPAN and few few (mis)trials with various modules I am reduced to making inquiry - which is the superior module for reading DBF files?

I have come into posession of a few very large DBF files and I need to accurately read and munge the contents. I have no need to read indices nor to write to DBF files. The ability to query for field name and type is valuable as is at least rudimentary error handling.


Replies are listed 'Best First'.
Re: Which xBase module?
by roboticus (Chancellor) on Mar 26, 2012 at 22:50 UTC


    I've not used any xBase packages, but if I were going to, I'd probably try DBD::Xbase first because I use the DBI package for all other database work.


    When your only tool is a hammer, all problems look like your thumb.

      I installed DBD::XBase and gave it a try. It works much better than the previous two modules. Especially for correct interpretation of field types.

      I am still scratching my head around how to get a list of field types but I'll read the module source and see what is being passed back.


        See the docs of DBI instead, the table_info() and column_info() methods. I think that's what you are looking for.

        Enoch was right!
        Enjoy the last years of Rome.

      I endorse DBD::Xbase. I've had it in production until a year ago when we finally abandoned the legacy FoxPro database we still had to read from.

      DBD::Xbase also comes with a handy little program, dbfdump.


        I found the nugget that is dbfdump in the module. It is called get_header_info and is perfect for what I am doing.

        Thanks to all for the great thoughts and advice!


Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://961760]
Approved by planetscape
Front-paged by planetscape
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (7)
As of 2018-07-16 18:58 GMT
Find Nodes?
    Voting Booth?
    It has been suggested to rename Perl 6 in order to boost its marketing potential. Which name would you prefer?

    Results (346 votes). Check out past polls.