#!/usr/bin/perl use strict; use Calendar::Simple; print "Content-type: text/html\n\n"; print "
| $_: | "; my $colcount=0; for (@month) { my $week = $_; for (@$week) { $cal .= "" .($_ ? (sprintf "%2d",$_) : ' ')." | "; $colcount++; } } $cal .= "".$days[$_ % scalar @days]." | "}(0..$maxcols); print "
| $calheader |