Aug 14, 2001, 4:33 AM
Post #2 of 2
First, do not count on data being sorted in an associated array (HASH). The only way to count on the sort is to put the keys into an array and then sort that array like this (assume %results is filled with search results):
my @sortedKeys = sort keys %results;
Now, in form to submit to get the next set of results (whether or not you are using hyperlinks or a submit button) you probably could put some hidden form elements with the values of the first displayed item and the last displayed item so you know which elements to display next. This is standard pagination logic. Get some books with CGI/Perl examples for search engines and these issues are usually addressed.
$a="c323745335d3221214b364d545a362532582521254c3640504c37292f493759214b3635554c3040606a0",print unpack"u*",pack "h*",$a,"\n\n"