To answer your question, yes, it is possible to use Perl to write a script for the Common Gateway Interface that will be invoked when an HTML form's "OK" button is clicked. The Perl script can also open a seperate text file and manipulate it in many ways. And most browsers support allowing users to save text files to their own local disk, so long as you make it available to them in some way; via HTTP service, FTP, etc.

If this is something that you need to get up and running quickly, and your current Perl programming skill level hasn't reached the point where you've learned how to open a file, you'll need to hire a programmer. On the other hand, if you have time and a thirst for knowledge, pick up a copy of Learning Perl (Published by O'Reilly and Associates), as well as CGI Programming with Perl, also published by O'Reilly.

You may also find additional learning opportunities in the Perl POD (Plain Old Documentation). Start with perlintro, perl, perldoc -f open, perlopentut, CGI.pm, and the various entries under perlfaq.

After you've begun reading these books and resources, you'll probably come up with specific questions to which we can offer specific answers. We're happy to help people who come here seeking Perl wisdom.

Update: I noticed that you double-posted this question. Don't repost questions just because the first post doesn't show up in Seekers of Perl Wisdom immediately. Posts only show up there after a PerlMonk of high enough level "approves" the post, and sometimes that can take awhile; particularly for questions that lack evidence of prior research by the person asking the question.


Dave


In reply to Re: Opening a text file by davido
in thread Opening a text file by Anonymous Monk

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.