On Nov 5, Dan Anderson said:

>There doesn't seem to be what I want in CGI.pm.  (I want to create a
>%GET and %POST hash of the form $HASH{NAME} = VALUE).

So make them yourself.  You can use param() and url_param() to get POST
and GET parameters if BOTH have been used in the same program (this is
possible).  Otherwise, determine the CGI method, and put them in the
correct hash.

  use CGI qw( param request_method );
  our (%GET, %POST);

  {
    my %hash;
    for (param) {
      my @values = param $_;
      $hash{$_} = (@values > 1) : [EMAIL PROTECTED] : $values[0];
    }
    (request_method() eq 'GET' ? *GET : *POST) = \%hash;
  }

>This seems kind of silly.  Can anyone explain to me why this is?

Do you know how hard it is to do it RIGHT?  Do you know how to parse file
uploads?  And do all the other stuff correctly?

-- 
Jeff "japhy" Pinyan      [EMAIL PROTECTED]      http://www.pobox.com/~japhy/
RPI Acacia brother #734   http://www.perlmonks.org/   http://www.cpan.org/
<stu> what does y/// stand for?  <tenderpuss> why, yansliterate of course.
[  I'm looking for programming work.  If you like my work, let me know.  ]


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to