Skip to content

Instantly share code, notes, and snippets.

@eduardosan
Created August 18, 2016 11:33
Show Gist options
  • Save eduardosan/066a6ad9a3c8de7b1f1723ada8782df2 to your computer and use it in GitHub Desktop.
Save eduardosan/066a6ad9a3c8de7b1f1723ada8782df2 to your computer and use it in GitHub Desktop.
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