update: scalar vs. $##!/usr/bin/perl use strict; use Calendar::Simple; print "Content-type: text/html\n\n"; print "<html><body><table style='width:100%;border-collapse:collapse;b +order:1px solid black;'>"; my $cal; my $maxcols=0; for (1..12) { my @month = calendar($_); $cal .= "<tr><td>$_:</td>"; my $colcount=0; for (@month) { my $week = $_; for (@$week) { $cal .= "<td style='border:1px solid black;wid +th:20px;height:20px;'>" .($_ ? (sprint +f "%2d",$_) : ' ')."</td>"; $colcount++; } } $cal .= "</tr>\n"; $maxcols = $colcount if $colcount > $maxcols; } my @days = qw (Sun Mon Tues Wed Thurs Fri Sat); my $calheader = join '',map {"<td style='width: 10px;'>".$days[$_ % sc +alar @days]."</td>"}(0..$maxcols); print "<tr><td> </td>$calheader</tr>\n$cal</table></body></html";
In reply to Re: Calendar Module
by bageler
in thread Calendar Module
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |