The variables you give after the ? are usually send as %ENV variables. Why not try to print them all and see if your webserver is like that?
#!/usr/local/bin/perl print "Content-type: text/html\n\n"; print "<pre>\n"; foreach $key (sort keys(%ENV)) { print "$key = $ENV{$key}<br/>"; } print "</pre>\n";
Now, you seem to want to use CGI, in that case, you get them in param, and you can iterate over them, as described in this previous post:
Best way to parse CGI params
You can then use:
my $q = new CGI; if ($q->param("URL")) { ... }
There is also something called Tainted mode, which you should use once your testcode is working, because what If the string after the ? is 2Mb big? or an invalid url etc.
In reply to Re: Perl CGI redirect
by FreeBeerReekingMonk
in thread Perl CGI redirect
by jbt424
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |