Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

Hi,

OK, I'm just loking for some general information regards a topic Im stuck on.
I'm trying to make my database allow me to edit an entry from a flattext db when
I select the line I want to change. I have created the database page etc
but I'm having trouble thinking of a way to make it editable.
I thought about defining the field in the database I wanted to change
with some kind of identifier so when I click edit, it would open
up the details in a seperate page. I know how to create the new page
but I dont have a clue how to go about ID'ing the field i want to
edit so that I can change the info and "then" have it go back to
where it was, nicely edited.
I have looked on the web for a while but with little success

Thanks

Replies are listed 'Best First'.
Re: Im in trouble, deep....
by arturo (Vicar) on Mar 22, 2001 at 20:41 UTC

    For your basic data structure, your search term (on this site and on Google, if you want more general information) is "flat file database"

    For how to find the line with the field you want to edit, your search phrases are: "find a specific line in a file", and more generally, "regular expressions"

    For how to edit that file in-place, see How do I change a single line in a file?.

    With respect to more advanced solutions, look into DB_File and/or MLDBM such things will let you manipulate a perl hash (see : the basic datatypes, three) which is stored on disk as if it were in memory.

    Philosophy can be made out of anything. Or less -- Jerry A. Fodor