HTML header

This commit is contained in:
Peter J. Holzer 2015-09-10 11:58:52 +02:00
parent 9ee81d8cd8
commit 799f209ded
1 changed files with 13 additions and 0 deletions

View File

@ -27,6 +27,16 @@ my $sth
); );
$sth->execute(); $sth->execute();
my $locks = $sth->fetchall_arrayref(); my $locks = $sth->fetchall_arrayref();
binmode STDOUT, ":encoding(UTF-8)";
say "<!DOCTYPE html";
say "<html>";
say "<head>";
say "<meta charset='UTF-8'/>";
say "</head>";
say "<body>";
if (@$locks) { if (@$locks) {
say "<table>"; say "<table>";
say "<tr>"; say "<tr>";
@ -48,6 +58,9 @@ if (@$locks) {
} else { } else {
say "<p>No locks \N{WHITE SMILING FACE}</p>"; say "<p>No locks \N{WHITE SMILING FACE}</p>";
} }
say "</body>";
say "</html>";
exit(0);
sub xmlencode { sub xmlencode {
my ($s) = @_; my ($s) = @_;