I am trying to read values from form using ReadParse() function in Hash (%in), I am not getting elements as order I submit in form, I Want get in same oreder as I submit in form, please give me solution. Thanks.
ReadParse() and Hash values order
176 views Asked by Maruti At
2
There are 2 answers
0
On
Check perldoc CGI
FETCHING THE NAMES OF ALL THE PARAMETERS PASSED TO YOUR SCRIPT:
my @names = $query->param;
As of version 1.5, the array of parameter names returned will be in the same order as they were submitted by the browser. Usually this order is the same as the order in which the parameters are defined in the form (however, this isn't part of the spec, and so isn't guaranteed).
Hash keys/values are not stored in the order they are added.
What are you trying to accomplish? Perhaps there is another way?
I didn't realize that the order is specified in the HTML spec: