Added charset to HTTP header output.

This commit is contained in:
Johannes Findeisen 2024-02-17 00:56:59 +01:00
commit 56199acc2f
15 changed files with 19 additions and 21 deletions

View file

@ -6,13 +6,11 @@ use warnings;
use strict;
use POSIX qw(strftime);
my $date = strftime "%m/%d/%Y", localtime;
print("Content-type: text/plain\n\n");
print "Hello from Perl!\n\n";
print $date;
print "\n\n";
print("Content-type: text/plain; charset=utf-8\n\n");
print("Hello from Perl!\n\n");
print("print(strftime('%m/%d/%Y %Z', localtime));\n");
print(strftime("%m/%d/%Y %Z", localtime));
print("\n\n");
print('my @i = (1..10); for(@i) { print("$_", "\n"); }');
print("\n");