@pairs = split(/&/, $ENV{'QUERY_STRING'}); foreach $pair (@pairs) { local($name, $value) = split(/=/, $pair); #That code that changes + to spaces and all the other characters... (which I know) }