Well for starters, I'd like to point out that these are just some suggestions, and aren't entirely related to what you're asking.
To make your life easier, as well as the lives of those who might have to maintain this, you should really check out some modules for the common tasks in your script.
CGI (included with any perl distribution) would be perfect for getting the parameters sent to this script, as well as printing the HTTP headers.
For sending email there are a whole slew of modules available, including
Mail::Sendmail and
Mail::Mailer.
I'm not sure exactly what runs slow with your script, but if a problem lies in the amount of time it takes recepients to get the email, there is a solution. Most likely what would cause this the local mail transport agent queueing the messages to be sent, and periodically sending them all out. This can be avoided by using a module (such as
Mail::Sendmail) that will send the mail right away.
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.