foreach my $pair (split /&/, $ENV{QUERY_STRING}) { my ($key, $value) = split(/=/, $pair); $parameters{$key} = $value; }