I need to create a subroutine that will readin the value of the querystring parse the query string and redirect the user to a helptopic, I am not sure how to accomplish theparsing and redirection, this is for a large pre-existing website,which I am now in charge of maintaining so far I have this..
Process form variables for both POST and GET methods.
# Below Will process all query string variables.
if ($ENV{'REQUEST_METHOD'} eq "GET" || $ENV{'QUERY_STRING'} ne "")
{
@pairs = split(/\&/, $ENV{'QUERY_STRING'});
foreach $pair (@pairs)
{
($name, $value) = split(/=/, $pair); # Split into name and value.
$$name = $value; # Assign value to scalar matching name.
$$name =~ s/%(..)/chr(hex($1))/ge; # Decode encoded stuff.
$$name =~ s/\+/ /g; # substitute +'s for spaces.
}
}
#Home page (and default opening topic): TEMPO 5 Help #Topics-01-1.html
#Home would be returned in the querystring as value for topic..
I am sure this is a pretty easy question but I am really new and don't totally understand how to access hash elements to get what I need.