good chemistry is complicated, and a little bit messy -LW |
|
PerlMonks |
K-Mart Blue Light E-mail Auto-responderby jcwren (Prior) |
on Aug 20, 2000 at 00:07 UTC ( [id://28668]=CUFP: print w/replies, xml ) | Need Help?? |
I have a lot of little Perl scripts that do things around the house, such as reading my weather station, converting it to a .WAV file for the hearing impaired, remote control of my amateur radio transceivers, moving the image from my webcam to the server, etc. A friend of mine was wishing that he could get data from my weather station over his 2-way pager. So, in the space of an hour or so, I wrote this (Mail::Internet does not have the most intuitive documentation around, by the way).
If you want to try it out, send mail to igor@jcwren.dyndns.org with the word 'weather' in the body. In a few moments you should get a response back with the current weather conditions at my boat. I'm sure there are already written auto-responders out there, but I felt like re-inventing the wheel on an otherwise dull Saturday, not to mention learning more about procmail and a new module. If you install this on your own machine, you'll need to modify the 'do_weather' subroutine to do something useful, since you won't have the weather database. After creating the user (in my case, igor), I created a ~/.procmailrc file with the following contents: I'm probably supposed to write an X-loop header into the out bound mail headers, but I haven't done that. Update: And thanks to merlyn for pointing out a better way of getting the output of the weather command.
--Chris
Back to
Cool Uses for Perl
|
|