Skip to content

Instantly share code, notes, and snippets.

@eduardosan
Created Aug 18, 2016
Embed
What would you like to do?
Perl basic cgi
#!/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