in reply to (crazyinsomniac) Re: Critique my First Script for me?
in thread Critique my First Script for me?

The %FORM was contributed by Ovid during my search engine research, the use CGI qw/:standard/; is left over from that, I thought it was invoking CGI.
I will make a point of rereading some of my CGI books now that my code knowledge is growing, I was reading them first when I found I needed to learn Perl to make any sense of them.

I don't understand several of your questions and this will make them excellent points on which I may build knowledge. Thanks again crazyinsomniac!

Replies are listed 'Best First'.
Re: Re: (crazyinsomniac) Re: Critique my First Script for me?
by runrig (Abbot) on Sep 22, 2001 at 02:58 UTC
    the use CGI qw/:standard/; is left over from that, I thought it was invoking CGI.

    use CGI; is all you need if you are using the OO interface (that's when you do my $q = CGI->new;). The 'qw/:standard/' part imports function names so that you don't need the $q variable and lets you, e.g., say 'param($field)' instead of '$q->param($field)', which makes it a little more of a hassle, but I don't like to import anything I don't have to, and sometimes you might need to create more than one CGI object, and so in that case the OO way is the only way to go.

      sometimes you might need to create more than one CGI object

      I like and use the OO interface too, and I've heard the above statement before... Have you ever actually needed to create more than one CGI object? I don't believe I've *ever* seen anything like:

      my $q1 = CGI->new; my $q2 = CGI->new;
      Have you?

      -Blake

        Have you?

        I've seen it, and used it. Usually as a way to have one CGI object to set some parameters on (and retain the rest) so that I can print out various query strings for URL's (e.g., when you want page 1, page 2, etc., type links from a database query), and one CGI object to retain all of the original parameteters.