Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
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 ( #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
Node Status?
node history
Node Type: note [id://409625]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (2)
As of 2021-06-21 02:08 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    What does the "s" stand for in "perls"? (Whence perls)












    Results (97 votes). Check out past polls.

    Notices?