Stefan: Script will meine Variablen nicht mehr ausgeben - Warum???

Beitrag lesen

Hallo zusammen!

Hier das Problem-Script:

---

#!/usr/bin/perl

if (!($ENV{'QUERY_STRING'})) {&login;}
else {&goUrl;}

sub login {
print "Content-type: text/html\n\n";
print qq~
<form action="test.cgi" method="get">
Login: <input type="text" name="login"><br>
Passwort: <input type="password" name="pass"><br>
Url (Ohne http://): <input type="text" name="url"><br>
<input type="submit" value="submit">
~;
}

sub goUrl {
@info = split(/&/,$ENV{'QUERY_STRING'});
foreach $key (@info) {
($name,$value) = split(/=/,$key);
$moreinfo{"$name"} = $value;
}

==> print "Location:http://$moreinfo['login']:$moreinfo['pass']@$moreinfo['url']\n\n";

}

exit;

---

Wieso gibt mir das Script in der markierten Zeile (>==>) nur leere Felder für "login", "pass" und "url" aus?

Wer hilft mir weiter?

Schon mal danke.

Grüße

Stefan