in reply to Form submission

Based on what you are saying, you have a few good options at your disposal:
  1. 1. Send a redirect header using the CGI module.
    use CGI qw/:standard/; send_mail(); print redirect('http://example.org/downloads.html');
  2. Use a templating solution, then after sending the email, process the downloads template
  3. or, since it seems to be static page, send the email, open the static downloads.html page, read it in and print it out to STDOUT.

Replies are listed 'Best First'.
Re^2: Form submission
by chimni (Pilgrim) on Mar 03, 2009 at 23:32 UTC

    Thanks that help

    If i can read and print the html, cant i just paste it in the perl file. But when i do that and use here docs I get lots of errors - barword found , use of modifier meaningless etc

      I think we could help you best if you would supply both the relevant parts of the Perl script and the actually errors you receive (the one where you use the heredoc), and the HTML page you are trying to paste.

      If you'd rather keep it as a separate page, you should be able to do something like this:

      # do all your email stuff open $fh, "<", "downloads.html" or die; while ($fh) { print; } close $fh;
      Or you could slurp in the file and print it all at once, but either way it should work.