Hello I am very new to writting perl scripts and I want to write a script to set the variables for another script. Here is basically what I want to do:

1). I want to have a form page that a person can enter the valuables to.

Example of the form:

<form method=post action=test.cgi> Server Address: <input type=text name="server_address"> Cgi Directory: <input type=text name="cgi_directory"> <input type=submit value=save> </form>

2). Then I want the form's submission to be saved to a file called test.cfg in this form:

$server_address = 'http://www.whatever.com';
$cgi_directory = '/InetPub/wwwroot/cgi-bin';

3). Then when the person wants to change the information, I want them to be able to go back to the form and have the form read in the input fields what they already saved.

4). Then when they change the information I only want the information that they changed to be updates in the test.cfg file.

I know this can be done, but I cant figure it out, the closets I have came to was getting the information from the form to the test.cfg file.

An example of this would be the Ultimate Bulletin Board. Any suggestions and help would be gratefully appreciated.

Thanks in advance.
Jonathan


In reply to Form/File/Form by jmoore

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.