Dermot Paikkos wrote:
Hi,

I am looking for a way to store firstname/surname/id values in a file. Currently I am using a flat file to store just the christian name and surname in the format:

firstname|surname

My problem is that the file is used to gain access a program and the users enter their surname to access it and there are users (not surprisingly) that have the same surname. To get around this some users are getting the surnames changed. I would prefer a more elegant solution and hoped there was a 3 field DBM file or similar I could use.

Does anyone know if there is something like this available? I could continue to use a flat file. There are only 50 users to store and perhaps it would not be improved by moving to a DBM file.

Thanx.
Dp.

~~
Dermot Paikkos * [EMAIL PROTECTED]
Network Administrator @ Science Photo Library
Phone: 0207 432 1100 * Fax: 0207 286 8668



You might consider using Storable and just dumping your user database to disk so that it can be read back in as a Perl structure. Or maybe XML::Simple to store it as XML, either method will give you an arbitrary amount of flexibility. Of course any delimited file should work, you could use Text::CSV for instance. It really comes down to how *you* want to solve it. DBI and SQLite might be a good choice too, then if you eventually move to a more robust DB server you shouldn't need to change your code (much).


Try a few out and see what works best. If you are talking about 50 users and only 3-10 fields they are all going to be about the same speed wise, aka really fast.

http://danconia.org

--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>




Reply via email to