Created
August 18, 2016 11:33
-
-
Save eduardosan/066a6ad9a3c8de7b1f1723ada8782df2 to your computer and use it in GitHub Desktop.
Perl basic cgi
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/perl -wT | |
use strict; | |
use HTML::Template; | |
use constant TMPL_FILE => "$ENV{DOCUMENT_ROOT}/template.tmpl"; | |
my $tmpl = new HTML::Template(filename => TMPL_FILE); | |
my $time = localtime; | |
$tmpl->param(current_time => $time); | |
print "Content-type: text/html\n\n", | |
$tmpl->output; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment