My script when tested shows it's error free, and it runs through the web browser without producing any errors as well. However, it doesn't print my $tags to browser and it doesn't send the email. Does anyone see why?

Thanks so much!

my $adminmail = 'venimfrogtongue@earthlink.net'; my $sendmail = '/usr/lib/sendmail'; use strict; my %form = ( author => undef, distributor => undef, copyright => undef, keywords => undef, description => undef, distribution => undef, robots => undef, language => undef, generator => undef, rating => undef, abstract => undef, usermail => undef, request => undef, ); use CGI; my $query = CGI->new; print $query->header; %form = %{$query->Vars}; open(HEADER, "header.txt") or die("Cannot open file: $!\n"); while (<HEADER>) { print "$_\n"; } close(HEADER); print <<"EOH" <table width="50%" border="0" height="296"> <tr> <td height="58"> <p>Below are your generated metatags!</p> <p>See below for instructions on how to install these within you +r website!</p> </td> </tr> <tr> <td bgcolor="#00CCCC"> EOH ; my $tags =''; if ($form{'abstract'} ne "") { $tags .= qq(<meta name="abstract" content="$form{'abstract'}"><br +>\n); } if ($form{'author'} ne "") { $tags .= qq(<meta name="author" content="$form{'author'}"><br>\n) +; } if ($form{'distributor'} ne "") { $tags .= qq(<meta name="distributor" content="$form{'distributor' +}"><br>\n); } if ($form{'copyright'} ne "") { $tags .= qq(<meta name="copyright" content="$form{'copyright'}">< +br>\n); } if ($form{'keywords'} ne "") { $tags .= qq(<meta name="keywords" content="$form{'keywords'}"><br +>\n); } if ($form{'description'} ne "") { $tags .= qq(<meta name="description" content="$form{'description' +}"><br>\n); } $tags .= qq(<meta name="generator" content="SpyderTagV1.0!"><br>\n); if ($form{'robots'} ne "") { $tags .= qq(<meta name="robots" content="$form{'robots'}"><br>\n) +; } if ($form{'language'} ne "") { $tags .= qq(<meta name="language" content="$form{'language'}"><br +>\n); } if ($form{'distribution'} ne "") { $tags .= qq(<meta name="distribution" content="$form{'distributio +n'}"><br>\n); } if ($form{'rating'} ne "") { $tags .= qq(<meta name="rating" content="$form{'rating'}"><br>\n) +; } print my $cgi->escapeHTML( $tags); print <<"EOF" </td> </tr> <tr> <td> <p>Copy the above tags within your HEAD document.</p> <p><i><font size="2" color="#0000FF"><i><HTML></font><br> <i><font size="2" color="#0000FF"><HEAD></font><br> <i><font size="2" color="#0000FF"><TITLE></TITLE></font><br> <font size="2" color="#FF3300">#---- insert tags here</font><br> <font size="2" color="#0000FF"><HEAD></font></i></p> </td> </tr> EOF ; ################################################# BEGIN EMAIL if ($form{'request'} eq "yes") { open (MAIL, '|-', "$sendmail -t") or die $!; print MAIL "To: $form{'useremail'}\n"; print MAIL "From: $adminmail\n"; print MAIL "Subject: SpyderTags Results:\n\n"; print MAIL "$tags\n"; close (MAIL); } ################################################ END EMAIL open(FOOTER, "footer.txt") or die("Cannot open file: $!\n"); while (<FOOTER>) { print "$_"; } close(FOOTER);

In reply to Problems printing to browser by sulfericacid

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • 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:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.