Hello, I'm trying to figure out how to make adjustments to the following code to run the requests through the command line instead of using a form(ie. mail.cgi?makemail, or mail.cgi?what=makemail)...any help would be greatly appreciated! Thanks! ~Lis
#!/usr/bin/perl require 'r-mail.cfg'; require 'r-mail.common.cgi'; require 'r-mail.sub.cgi'; $use_cgi = 1; &readform; &confirm if ($action eq 'confirm'); &actually_send_mail if ($action eq 'moremail'); &set_mail if ($what eq 'setmail'); &set_sig if ($what eq 'setsig'); &set_add_list if ($what eq 'setaddlist'); &set_del_list if ($what eq 'setdellist'); &set_list if ($what eq 'setlist'); &set_pass if ($what eq 'setpass'); &make_mail if ($what eq 'makemail'); &change_sig if ($what eq 'changesig'); &add_list if ($what eq 'addlist'); &set_del_list2 if ($what eq 'setdellist2'); &del_list if ($what eq 'dellist'); &set_list2 if ($what eq 'setlist2'); &change_list if ($what eq 'changelist'); &change_pass if ($what eq 'changepass'); #&check_pw; &render_admin; exit; sub render_admin { print <<"END"; <html> <head> <title>Notable Web CBL: Multi-Mailer</title> </head> $head $pageadmin $mid <center><table BORDER=0 CELLSPACING=0 CELLPADDING=10 BGCOLOR='#663366' + > <tr><td> <center> <table BORDER=0 CELLSPACING=3 CELLPADDING=3 WIDTH='100%' BGCOLOR='#FFF +FFF' > <tr><td> <center> <h1>R-Mail</h1> </center> </td></tr> <tr><td> <center><form action = '$cgiurl/r-mail.cgi' method='post'><input type= +'hidden' name='what' value='setmail'><input type='submit' value='Comp +ose a Message'></form></center> </td></tr> <tr><td> <center><form action = '$cgiurl/r-mail.cgi' method='post'><input type= +'hidden' name='what' value='setsig'><input type='submit' value='Chang +e Signature File'></form></center> </td></tr> <tr><td> <center><form action = '$cgiurl/r-mail.cgi' method='post'><input type= +'hidden' name='what' value='setaddlist'><input type='submit' value='A +dd New Mailing List'></form></center> </td></tr> <tr><td> <center><form action = '$cgiurl/r-mail.cgi' method='post'><input type= +'hidden' name='what' value='setdellist'><input type='submit' value='D +elete a Mailing List'></form></center> </td></tr> <tr><td> <center><form action = '$cgiurl/r-mail.cgi' method='post'><input type= +'hidden' name='what' value='setlist'><input type='submit' value='Edit + Existing Mailing List'></form></center> </td></tr> </table></center> </td></tr> </table></center> <br> $footer </body> </html> END exit; }

In reply to Command Line Question by lisaw

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.