Hello - I have the following CGI in CGI-BIN, its short sendmail program:
#!/usr/bin/perl strict my $sendmail = "/usr/sbin/sendmail -t"; my $from = "From: Foo@Bar.com\n"; my $subject = "Subject: Request to share information\n"; my $content = "Hello..."; my $to = "To: user\@ameritech.net\n\n"; my $recipient = "schafferm\@ameritech.net\n\n"; open(SENDMAIL, "|$sendmail $recipient") or die "Cannot open $sendmail: $!"; print SENDMAIL $subject; print SENDMAIL $from; print SENDMAIL $to; print SENDMAIL $content; close(SENDMAIL);

I then call this from HTML - via a java scripted button w/ /cgi-bin/sendanon.cgi

sendanon.cgi has been set wide open for the time being with chmod 777.

the script executes and yields the following error:

[Mon Jul 15 08:16:26 2002] [error] (2)No such file or directory: exec of /CompleteAct/domains/organexchange.org/http-lib/cgi +- bin/sendanon.cgi failed

any ideas?

edited: ~Tue Jul 16 21:45:35 2002
by footpad: Removed ^M characters from code and added fromatting tags


In reply to Calling Perl from HTML by OEMike

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.