Can you help with my Perl data bese?

tim85a

New member
I'm trying to make a data base that my Perl program can access. I'm thinking about having it in a .txt file and it looking like this...

#START FILE#

name = Mr Smith
Address = 1 The Rd
Some Town

#END FILE#

#START FILE#

name = Mr Jones
Address = 1 The Street
Another Town

#END FILE#

What I would like to know is, will this work and would I be able to search for "Mr Smith" and print his address or search for the address and print his name? If it will work, could you point me in the right direction to find a website to help me write a search program?

Thanks for your help.
 
Storing a database in a text file is a SOLVED problem. In fact there is free code to do all the dirty work for you. And since you're asking about Perl, there is more than one way to do it. Go to search.cpan.org and look at DBM::Deep, DBD::AnyData for starters.
 
Back
Top