[EMAIL PROTECTED] wrote:
> Hello,
> I am Martin Schaaf, Forth hacker and Perl mystified.
> 
> I'm taking on a volunteer project to create a cgi script to maintain a 
> simple flat file database and generate reports through email.  Passwords 
> and commands would be passed through the email Subject: line.  The 
> unique identifier for each record would be a password known only to the 
> person who created that record.  Results would be returned via email.  I 
> want to keep the database in a straight character deliminated text file 
> format that could be fixed using a text editor if it gets corrupted.
>

This doesn't sound like a CGI script, unless you are generating the 
e-mail that is sent with the commands in the subject from the web, but 
in any case......

There are a number of modules for manipulating character delimited flat 
db files, for instance DBI::CSV which may be overkill for your app. I 
would check the CPAN for others or someone else here can propose some.

Couple questions about the design:

1) Can you be *completely* certain that the passwords are unique, this 
seems scary to me depending on the number of records keeping track of 
whether some password has already been used could be a hassle, just a 
question.  Using a unique (but hidden) identifier such as an int might 
save hassles in the future.

2) Don't know how secure the data is but sending passwords through the 
subject line could prevent more security in the future as headers can't 
be encrypted by most mailers. If the paths are trusted this is obviously 
not an issue.


> I'm imagining that I can hack a simple maillist program to handle the 
> email portion.  My question is:
> 

Again there are lots of modules to handle mail messages including header 
and content parsing, etc.  Look on the CPAN for them.


> Given a record of a character deliminated string of fields, how can I 
> best insert and extract the record?
> 

See above.

http://danconia.org


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to