nyananyom has asked for the wisdom of the Perl Monks concerning the following question:

Please i need some help on how to Use CGI scripts, written in Perl, to store the validated form data into a text file that must be named personalDetails.dat on a UNIX server, or to retrieve data from it. thanks

Replies are listed 'Best First'.
Re: storing or retrieveing
by bradcathey (Prior) on Jan 09, 2005 at 20:15 UTC

    First things first. Perl is the "script" and CGI is the method. CGI is often equated with/as Perl, but in reality, CGI is a module that Perl uses to parse form input, but not to necessarily write data to a file. Anyway...

    Why don't you show us what you have already, and then we can be more efficient in our help.


    —Brad
    "Don't ever take a fence down until you know the reason it was put up." G. K. Chesterton
Re: storing or retrieveing
by davido (Cardinal) on Jan 10, 2005 at 04:07 UTC

    Are you asking how to use a CGI script that's written in Perl, or are you asking how to write a CGI script in Perl?

    If you're asking how to use a CGI script that's written in Perl, you should contact the script's author or its support group. If you're asking how to write a CGI script in Perl, you have to learn to program, and how to do so in Perl, and how to apply that to programming for the Common Gateway Interface (CGI). This isn't one of those things you can do well by asking one or two vague questions. Honestly the best answer I can give to your question, instead, is a good list of things to do in order to get started, if you're interested in really committing the time it takes to learn:

    1. Buy or borrow a copy of Learning Perl, published by O'Reilly & Associates and read it. As you read it, follow its guidance on installing Perl and work your way through its examples.
    2. As you come up with specific questions while reading that book, be sure to ask them here; we love to help when people ask the kinds of questions that can actually be answered.
    3. Find a webhost that allows you to write and work with CGI scripts on its server, and that allows you to do so using Perl.
    4. Obtain CGI Programming with Perl, 2nd Edition, also published by O'Reilly & Associates, also working through its examples as you read it cover to cover. Be sure to pay extra attention while reading the sections dealing with web security.

    Please let us know when you need help at any step along the way, and enjoy the world of possibilities newfound knowledge opens before you.


    Dave

Re: storing or retrieveing
by holli (Abbot) on Jan 09, 2005 at 20:20 UTC
    This is not a "please write a script for me" site.
    If you learn some perl and try to set up a piece of code on your own, weŽll be glad to help.

    To get you started, read How to ask questions the smart way.