Readers: 10
1
2
3
4
5
6
<Location /cgi/auftrag>
SetHandler perl-script
PerlResponseHandler ModPerl::Registry
PerlOptions +ParseHeaders
Options +ExecCGI
</Location>
Guest janusDeins ist nicht mod_perl.
1
2
3
4
5
6
7
8
9
10
11
12
#!/usr/bin/perl
use strict;
...
&header();
&mitte();
&footer();
print "Content-Type: text/html; charset=utf-8\n\n";
print "TESTAUSGABE";
print $HTML;
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
#!/usr/bin/perl use strict; use warnings; use utf8; sub header { return '<h1>KOPF</h1>'; } sub mitte { return '<div>Blah Blöh!</div>'; } sub footer { return '<p>Copyleft (c)1977 by Ox Narrd</p>'; } my $HTML = header(); $HTML .= mitte(); $HTML .= footer(); print "Content-Type: text/html; charset=utf-8\n\n"; print "<h2>TESTAUSGABE</h2>"; print "<p>time() is: ".time."</p>"; print $HTML;
QuoteTESTAUSGABE
time() is: 1457100957
KOPF
Blah Bl�h!
Copyleft (c)1977 by Ox Narrd
print "<p>Perl: $ENV{MOD_PERL}</p>";