Perl: the Markov chain saw | |
PerlMonks |
Re: using Email to Perl to append to a changelog.txt, html, or .xls?by toma (Vicar) |
on Nov 22, 2004 at 15:38 UTC ( [id://409625]=note: print w/replies, xml ) | Need Help?? |
I built a system like this once.
It used a mailto: URL when a form was submitted.
The mail was processed by procmail, which called
a perl program to do the file update. The program
used RCS so that the changes could be reversed
if there was a problem. The trick is to get file locking to work properly, so that two pieces of mail don't have the file open for writing at the same time. In my case, procmail handled this for me automatically. On unix at least, mail is in some ways a better mechanism for web form submissions than HTTP POST or GET. It is more complicated to program, but it is more reliable since the clients do automatic retries when the server is down. It is best suited for jobs like yours, where you submit a single piece of data that needs to be saved, not an interactive interface.
It should work perfectly the first time! - toma
In Section
Seekers of Perl Wisdom
|
|