Mark
The Read and Parse in Perl is not that easy as it is in PHP.
You can use the cgi-lib.pl
#!/usr/bin/perl
require "./cgi-lib.pl";
&ReadParse(*form_data);
$url = "$form_data{'url'}";
print "Location: $url\n\n";
exit;
OR
To read and parse only one var, you can make it by yourself:
#!/usr/bin/perl
$url = "$QUERY_STRING";
$url =~ s/url=//gi;
replaces 'url=' por '' in $url
print "Location: $url\n\n";
exit;
OR
to r&p more than one vars via get method:
#!/usr/bin/perl
$in = $ENV{'QUERY_STRING'};
push (@in,$ENV{'QUERY_STRING'});
@in= split(/&/,$in);
foreach $i (0..$#in) {
$in[$i] =~ s/+/ /g;
$in[$i]=~ s/%(..)/pack("c", hex($1))/ge;
($key , $val) = split (/=/,$in[$i],2);
$in{$key} .= "\0" if (defined($in{$key}));
$in{$key} .= $val;
}
$url = "$iprint "
Location: $url\n\n";
exit; n{'url'}";
For this case, use the #2!
C ya
Egidio