in reply to Re^6: Problems around Param (CGI->param or CGI->multi_param instead of CGI->Vars )
in thread Problems around Param

I don't understand, are you saying that the order appearing in hash.dat is not the same as they appear on the html table ?

Is there any pattern to the order you want them in ? For example the number before the underscore.

poj
  • Comment on Re^7: Problems around Param (CGI->param or CGI->multi_param instead of CGI->Vars )
  • Download Code

Replies are listed 'Best First'.
Re^8: Problems around Param (CGI->param or CGI->multi_param instead of CGI->Vars )
by sauravrout (Novice) on Aug 27, 2015 at 07:45 UTC
    Yes, actually we were doing a sort here
    for my $k ( sort $q->param )
    I removed the sort and I am getting in the desired order. But will it every time come in the same order that it was entered in the html table? Because I know hash doesn't save the values in the order that they were inserted. Correct me if I am wrong.

      Correct me if I am wrong.

      poj code doesn't use hash

      If you want to guarantee an order no matter what client submits in the form, you're going to have to sort

        YEah.. just realized it. Thanks all for helping me out.!