Beefy Boxes and Bandwidth Generously Provided by pair Networks
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??


in reply to using Email to Perl to append to a changelog.txt, html, or .xls?

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
  • Comment on Re: using Email to Perl to append to a changelog.txt, html, or .xls?

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://409625]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others romping around the Monastery: (5)
As of 2024-04-23 21:41 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found