in reply to post variables in same order

You don't mention how you're getting the parameters, but if you're using CGI.pm, all_parameters() will return a list of parameters, in the order they were received.

You might also carefully examine the post request you're creating, by adding   print $req->as_string(); Building a request by hand (instead of using HTTP::Request::Common) takes great care. In particular, you need to ensure that the content is URL encoded. Your script doesn't guarantee that.

Replies are listed 'Best First'.
Re: Re: post variables in same order
by inblosam (Monk) on Jun 28, 2002 at 05:05 UTC
    In using CGI.pm, what do I need my "use" statement to refer to? I tried searching on CPAN for it, but that didn't help. I know I've seen it used before somewhere. Does "all_parameters()" return the list in a hash?
    Thanks!!

    Michael Jensen
    michael at inshift.com
    http://www.inshift.com
      In using CGI.pm, what do I need my "use" statement to refer to?

      Hm.. all_parameters() doesn't seem to be part of the public API for CGI.pm. To use it, you need to create an instance of CGI, and invoke all_parameters() as a method call.

      use CGI; ... my $cgi = new CGI(); ... my @paramsInOrder = $cgi->all_parameters();
      should do what you need.