in reply to Flat file DB

I assume your database looks something like this?

entry1|entry2|entry3|entry4|entry5| entry6|entry7|entry8|entry9|entry10| entry11|entry12|entry13|entry14|entry15|

The easiest way to do it would be to open the file, put the data into an array, split each array element on the pipe, and then go from there.

open (DATA, "data.dat") @data = <DATA>; close (DATA); foreach $item (@data) { @elements = split (/\|/, $item); # do your comparisons to each item in @elements here }

This is really an inefficient way to store data... I suggest you upgrade to a (my|postgre|donthurtme) database. Perl works really well with them, has a lot of support, and they are much faster

Replies are listed 'Best First'.
Re: Re: Flat file DB
by Anonymous Monk on Aug 30, 2001 at 02:18 UTC
    Actually, the data looks something like this:

    entry1_stuff1|entry1_stuff2|entry1_stuff3 entry2_stuff1|entry2_stuff2|entry2_stuff3 entry3_stuff1|entry3_stuff2|entry3_stuff3

    and so on...