Ok, sorry about the confusion.
I am, as you can see, trying to parse the query string from the URI after a form is submitted for example. The routine does this fine but I the output is a hash in the form of $IN{''}. I want the output to be like this $IN->{''}. Since I added the foreach simple to do this, it works fine except that ASCII characters aren't being converted for example, %20 (a space).
I submit this: ?act=This%20is%20a%20string%20with%20spaces.
With the routine without the foreach command for the conversion, it works perfectly.
It prints this: This is a string with spaces.
With the foreach command some ASCII characters are left unchanged and
It prints this: This%20is%20a%20string%20with%20spaces.