Hi, thnaks for your reply. I am doing it with a front end html code.

Here's my front end html code. it's release.html

<html> <head> <title>Release your email</title> </head> <body bgcolor="#95B8DB" onload="parent.adjustMyFrameHeight();"> <form action="/cgi-bin/release.pl" method="post"> <h1>Release your email</h1> <div style="height:500px; dispaly:block;">Pls input the Mail ID: <inpu +t name="release" size="20" style="height:30px"> <input type="submit" +value="Release" style="height:30px"></div> </form> </body> </html>

Here's the release.pl code. It works. Remember I still am a Novice. Pls don't blame my perl code. I don't feel shy. Everyone learns little by little. any way, This code works.

#!/usr/bin/perl use CGI qw(:standard); $ENV{"PATH"} = "/usr/sbin:/usr/bin:/sbin:/bin"; $release = param('release') || '<i>(No input)</i>'; print "Content-type: text/html\n\n"; print "<body bgcolor=\"#95B8DB\">"; print "<h1>You are releasing: $release</h1>"; system("/bin/echo > /tmp/releaseme"); system("sudo /bin/chmod 777 /tmp/releaseme"); system("sudo /usr/bin/amavisd-release $release 2> /tmp/releaseme"); if (system("less /tmp/releaseme |grep Ok > /dev/null") == 0) { print "<h2>Your Mail ID $release was released.\n</h2>"; print "<br />"; } else { print "<h2>Error!!! Wrong Mail ID, Pls Input the Right Mail ID +.\n</h2>"; print "<br />"; } print "</body>";

Anyway, I had to change the code since it gave an error due to below line in that release.pl code

$release = param('release') || '<i>(No input)</i>';

I changed it in this way. Pls see the below release.pl code. THIS IS the code I now use. But does NOT work

#!/usr/bin/perl use CGI qw(:standard); $ENV{"PATH"} = "/usr/sbin:/usr/bin:/sbin:/bin"; #$release = param('release') || '<i>(No input)</i>'; print "Content-type: text/html\n\n"; print "<body bgcolor=\"#95B8DB\">"; #print "<h1>You are releasing: $release</h1>"; print "<h1>You are releasing: $id</h1>"; system("/bin/echo > /tmp/releaseme"); system("sudo /bin/chmod 777 /tmp/releaseme"); system("sudo /usr/bin/amavisd-release $id 2> /tmp/releaseme"); if (system("less /tmp/releaseme |grep Ok > /dev/null") == 0) { print "<h2>Your Mail ID $id was released.\n</h2>"; print "<br />"; } else { print "<h2>Error!!! Wrong Mail ID, Pls Input the Right Mail ID +.\n</h2>"; print "<br />"; } print "</body>";

Many thanks for your reply. Your INPUTS r welcome. Thanks a lot


In reply to Re^6: INSERT file contents inside a table by theravadamonk
in thread INSERT file contents inside a table by theravadamonk

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.