hi!
eine frage:
wie lese ich folgende url in ein hash ein:
www.bla.de/cgi-bin/bla.pl?name=henry&id=00002
also, dass es so gespeichert wird:
%variable{"name", "henry", "id", "00002"}
So werden Hashs nie gespeichert ;))
if ($ENV{'REQUEST_METHOD'} eq 'GET')
{
$data = $ENV{'QUERY_STRING'};
} else {
read(STDIN, $data, $ENV{'CONTENT_LENGTH'});
}
my @data = split /&/, $data;
for (@data)
{
my ($key, $value) = split /=/;
$value =~ s/%([a-fA-F0-9]{2})/pack("C", hex($1))/eg;
$param{$key} = $value;
}
bye, Frank!