Thread Leere Seite nach Browser Reload (10 answers)
Opened by ALE1981 at 2016-03-04 11:03

GwenDragon
 2016-03-04 15:17
#184034 #184034
User since
2005-01-17
14538 Artikel
Admin1
[Homepage]
user image
Geht bei mir:
Code (perl): (dl )
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;

Erzeugt dann:

Quote
TESTAUSGABE

time() is: 1457100957

KOPF

Blah Bl�h!
Copyleft (c)1977 by Ox Narrd


Da kommt nie weine weiße Seite und es ist immer aktuell.

Du kannst auch gern noch folgendes einfügen, dass siehst du dass mod_perl äuft:
Code: (dl )
print "<p>Perl: $ENV{MOD_PERL}</p>";

Last edited: 2016-03-04 15:25:04 +0100 (CET)
die Drachin, Gwendolyn


Unterschiedliche Perl-Versionen auf Windows (fast wie perlbrew) • Meine Perl-Artikel

View full thread Leere Seite nach Browser Reload