I had long back written this function


# CGI2Hash
#       Converts a CGI object into a hash array
#
#
#       prototype CGI2Hash($ques,\%vals)
#
#       $ques - the CGI Object
#       \%values - the returned array with the field names as keys
#
#
sub CGI2Hash {
    my($ques, $values) = @_;
    my(@all_keys, $each_key);

    @all_keys = $ques->param();
    foreach $each_key (@all_keys) {
        $$values{$each_key} = $ques->param($each_key);
    }
        return 0;
}




Matt Simonsen wrote:
I need to get all the words in a query (q=___) out of a (URL, I think)
encoded string.
Example line and my current plan:

$queryString =
'pp=20&q=Finance/Banking/Insurance&qField=All&qMatch=any&qSort=smart&view=1'

my %querys = $queryString =~ /(\S+)=(\S+)&?/g ;

#Here I could use a tip on how to split counting the encoding
@words = split ($querys{q}) ;
I have to do this for millions of lines per month so any tips to help me
optimize this would be appreciated.

Thanks
Matt




--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to