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 |