--- Curtis Michelson <[EMAIL PROTECTED]> wrote:
> Hi,
> 
> I'm a Perl newbie for sure.  I recently subscribed to the list and
> this is my first post.

Welcome aboard. =o)

> . . . 
> I'd like to try using Perl for a current client project.  Situation
> is this:
> Web users need to hit an HTML form page, fill out the form, press
> "submit" and then the data needs to be formatted into either a comma
> or tab delimited text file and then emailed to a specific fixed email
> address.   The backend Perl cgi code is what I need help with.
> 
> Would anyone have suggestions on the best way for me to go about
> doing this with Perl?  Is there some publicly available base code I
> could start from and then modify or tweak to fit my needs?  Since I'm
> on a short timeline for the project, I'm open to  hiring a Perl
> consultant to help me wrap this up quickly.
> 
> Any thoughts?

Absolutely. use CGI.pm, which will automatically parse your form input
for you. It'll save you a lot of time. Also, try Mail::Sendmail. You'll
have to configure that, which isn't *too* bad, but then it's all pretty
simple.
e.g.:

 #!/path/to/perl -w
 use CGI;
 use Mail::Sendmail;
 my $q = new CGI; # reads and parses the form!
 my @flds = $q->param;
 my $msg;
 for my $field (@flds) {
   my $line = "$_\t" . $q->param($field) . "\n";
   $msg .= $line;
 }
 sendmail( TO      => '[EMAIL PROTECTED]', # target email
           From    => '[EMAIL PROTECTED]', # sender email
           Message => $msg ) or die $Mail::Sendmail::error;

 print "Message sent:\n$msg\n$Mail::Sendmail::log\n";
 exit;

If you run into trouble the docs can't help you with, post here or
email me personally. =o)

Paul

__________________________________________________
Do You Yahoo!?
Yahoo! Auctions - buy the things you want at great prices
http://auctions.yahoo.com/

Reply via email to