|< 1 2 >| | 17 Einträge, 2 Seiten |
1 2 3 4 5 6 7 8 9 10 11 12
debian:/var/www# cat begruessung.html <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>
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
debian:/var/www# cat hello.pl #!/usr/bin/perl -w 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>";#!/usr/bin/perl -w
1
2
3
4
5
6
#!/usr/bin/perl -w
use strict;
use CGI qw(param);
my $fname = param('vorname');
print "Content-type: text/html\n\n";
print "$fname\n";
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
debian:/var/www# cat begruessung.html
<html>
<head>
<title>Wie heist du denn?</title>
</head>
<body>
<form action="cgi-bin/hello.pl" method="post">
<input type=text name="vorname" size=30>
<input type=submit value="Ich haben fertig!">
</form>
</body>
</html>
debian:/var/www# cat /usr/lib/cgi-bin/hello.pl
#!/usr/bin/perl -w
#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>";#!/usr/bin/perl -w
Duff+2008-01-17 16:11:43--Aha. D.h. ich müsste mir das Modul aus dem Internet herunter laden und installieren.
Die richtige Benutzung des Moduls kann ich dann aus den manpages nehmen?
|< 1 2 >| | 17 Einträge, 2 Seiten |