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

Thanks poj. I am getting desired result. But the issue I am facing is the inputs are not coming in the order in which they are inserted to the hash. I know hash doesn't store values in order, but is there any way to achieve this ? Note: I don't have Tie::IxHash; installed on my system and I am not authorized to install this.
  • Comment on Re^6: Problems around Param (CGI->param or CGI->multi_param instead of CGI->Vars )

Replies are listed 'Best First'.
Re^7: Problems around Param (CGI->param or CGI->multi_param instead of CGI->Vars )
by poj (Abbot) on Aug 27, 2015 at 06:06 UTC

    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
      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