Hallo,
ich möchte gerne wissen, wie ich ein html und perl/cgi verknüpfen muss.
Ich habe mir auf einem linux-system apache installiert und den Dienst gestartet.
Im Verzeichnis /var/www habe ich folgende Datei erstellt:
1
2
3
4
5
6
7
8
9
10
11
12
debian:/var/www
<html>
<head>
<title>Wie heist du denn?</title>
</head>
<body>
<form action="hello.pl" method=get>
<input type=text name="vorname" size=30>
<input type=submit value="Ich haben fertig!">
</form>
</body>
</html>
Das Skript hello.pl sieht so aus:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
debian:/var/www
use strict;
my $qrystrg = $ENV{'QUERY_STRING'};
($varname, $varwert) = split(/=/, $qrystrg);
print "Content-type: text/html\n\n";
print "
<html>
<head>
<title>Hallo $varwert</title>
</head>
<body>
<h1>Hallo $varwert</h1>
</body>
</html>";
Nur funktioniert die Ausführung noch nicht. Was muss ich ändern?
Habe das Skript auch schon mal nach /usr/lib/cgi-bin kopiert. Hat aber auch nichts gebracht.
Danke.
D'OH
Daniel