#!/usr/bin/perl -w # Randolph Langley, 2015-01-20 ### We don't have to use the package CGI, but it does make things easier and more maintainable use CGI; use CGI::Pretty; ### Boilerplate my $q = CGI->new; print $q->header(); print $q->start_html(); ### Now for some content: get Greenwich mean time (UCT, actually, I believe... ;-) my ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = gmtime(time); # adjust the year since it is based on the number of years from 1900 $year += 1900; # adjust the month since it is 0-11 rather than 1-12 $mon++; print $q->pre("Greenwich mean time = $year-$mon-$mday $hour:$min:$sec\n"); ### finish it print $q->end_html(); exit(0);