I have a perl script that I am running from a browser. I’m passing query variables to it, but the query variables are showing up like johndoe%40test%2Ecom instead of johndoe@test.com
I would like to debug the variables to see how they are showing up in the beginning of the script.
In PHP it would be when accessing the url:
http://localhost/dump-variables.php?foo=1&bar=2&bis=johndoe%40test%2Ecom
The PHP script would include this code:
header('Content-type: text/plain');
print_r($_GET);
And the result would be:
Array
(
[foo] => 1
[bar] => 2
[bis] => johndoe@test.com
)
Perl version : 5.010001
Important Note
I don’t have any special access (root / sudo) on the system I’m working on – so modules may have to be included via source…
You’ve tagged this CGI, so I’ll first suggest using something more efficient.
But if you are going to use CGI, and assuming the use of CGI.pm, then (from the CGI.pm docs):