in reply to accessing random count CGI parameters
First, don't process the QUERY_STRING by hand! Let CGI do that. For instance, parameters might get passed using ';' as a separator rather than '&'. See Ovid's CGI Course for more on that.
That said, the following would do
use CGI; my $q = CGI->new; my @list = map { $q->param('xxx'.$_) } 1 .. $q->param('xxxc'); # values now sequential in @list.
For not duplicating the values into @list, use
foreach my $index (1 .. $q->param('xxxc') ) { my $value = $q->param('xxx' . $index); # now do whatever with the value ... }
If you absolutely want your %INPUT hash, you get it populated with
%INPUT = $q->Vars;
--shmem
_($_=" "x(1<<5)."?\n".q·/)Oo. G°\ /
/\_¯/(q /
---------------------------- \__(m.====·.(_("always off the crowd"))."·
");sub _{s./.($e="'Itrs `mnsgdq Gdbj O`qkdq")=~y/"-y/#-z/;$e.e && print}
|
|---|