[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

Re: [MacPerl] the return of newbie :)



At 15.03 10/1/97, David A. Barro wrote:
>I got a new one now :)  (wait, don't hide)
>Back in the OLD way (un*x) I used to have a statement in my cgi
>scripts that said:  require "cgi-lib.pl", another statement that
>said: &ReadParse (*input) (or something very close to that)
>and I basically referred to all the input from a web page by its
>symbolic variable name from the html code...
>
>ReadParse was a very nice utility from the cgi-lib.pl utility set
>that I had.... My question is...
>
>Now that I'm in the NEW way, is/are there any equivalent utilities
>that I'll have to make reference to via a require statement?

Get CGI.pm from CPAN or somewhere, and then:

        use CGI qw(:cgi-lib);
        &ReadParse(*input);

That's if you want to simply not rewrite your scripts to use CGI.pm.  But
you can also do the following:

        use CGI;
        $cgi = new CGI;

Now all of your variables are in the $cgi object.

        $first_textbox = $cgi->param('first_textbox');

Or you can import the key/values into a new namespace:

        $cgi->import_names('Q');
        $first_textbox = $Q::first_textbox;
        @list_items = @Q::list_items;

etc.

--
Chris Nandor             pudge@pobox.com             http://pudge.net/
%PGPKey=('B76E72AD',[1024,'0824 090B CE73 CA10  1FF7 7F13 8180 B6B6'])



***** Want to unsubscribe from this list?
***** Send mail with body "unsubscribe" to mac-perl-request@iis.ee.ethz.ch