#!/usr/bin/perl # this code has not been tested/debugged use Time::Format 'time_format'; use CGI; use strict; use warnings; # logic part.. where you establish values solve problems my $d = time_format('mm/dd/yy',time); my $cgi = new CGI; # output part... better to separate # for your own organization's sake my $html = $cgi->header . $cgi->start_html . $cgi->h1('hello') . $cgi->p("Today is $d"); # now you print print $html; exit;