Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?

ASCII databases

by pschoonveld (Pilgrim)
on Mar 01, 2000 at 23:59 UTC ( #4636=perlquestion: print w/replies, xml ) Need Help??
pschoonveld has asked for the wisdom of the Perl Monks concerning the following question:

Has anyone ever used any good modules for ASCII delimited databases? I have seen a couple kicking around, but it seems to me that there was a really good module for this I saw a while back. Thanks.

Replies are listed 'Best First'.
Re: ASCII databases
by Anonymous Monk on Mar 02, 2000 at 01:37 UTC
    I strongly recommend Shishir Gundavaram's It gets a bit clunky if you've got more than a few hundred records (as you'd expect), but since it uses SQL-like syntax it shouldn't involve too much pain to upgrade to a proper RDBMS at a later date. You can also use regular expressions as search criteria.
Re: ASCII databases
by btrott (Parson) on Mar 02, 2000 at 00:49 UTC
    Check out DBD::CSV. It's a DBI database driver that lets you use comma-separated text files as if they were databases.

      Yepp, Using DBI with DBD::CSV is fine for that job (and it does allow to use other delimiters than comma, too. I prefer "|" :-), but unfortunately it still lacks of joining data from several files/tables. That means "SELECT * FROM table1,table2;" doesn't work yet. :-/

      There is no place like $HOME
RE: ASCII databases
by Anonymous Monk on Mar 02, 2000 at 01:15 UTC
    The Perl Cookbook by O'Reilly shows two ways to do this. The module to use is: use Text::ParseWords;
Re: ASCII databases
by Anonymous Monk on Mar 03, 2000 at 20:41 UTC
    i'd advise a DBI module for later migration options ;-)

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://4636]
Approved by root
[haukex]: Yes sorry I don't run them all the time, my POD tests are only run as author tests (and are excluded when I'm using Devel::Cover)
[Corion]: choroba: Hmm - no, I keep the snippets inline, but as my framework also has support for capturing output etc., maybe I should do the same...
[Corion]: haukex: Yes, that approach is sane, and it heals the fragility of Pod parsers in a nice way while still syntax-checking stuff
[choroba]: Unfortunately, none of it is online
[haukex]: I figured that POD tests make sense, but only as author tests
[choroba]: I mean, the slides are, but not the makefile with scripts to create them
[Corion]: haukex: I've only now arrived at that revelation ;)
[Corion]: choroba: I use spod5, which also has that support, and also implements its own kinda-make stuff
[haukex]: But that module I just linked to assumes that most verbatim blocks are runnable code, I have other modules where that's not the case, so there I just copy-and-paste the synopsis into the author tests...
[haukex]: not the most efficient, but then again, I don't have that many modules on CPAN :-)

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (10)
As of 2017-02-27 12:27 GMT
Find Nodes?
    Voting Booth?
    Before electricity was invented, what was the Electric Eel called?

    Results (385 votes). Check out past polls.