sub displayCalendar { my $a= localtime($edate); # Get today's date. my ($b,$c)= ($a->mon+1,$a->year+1900); # Get month and year. my @a= `cal $b $c`; # Pass to Unix's cal command. my $day= localtime->mday; # Get the current day my @b=map{ chomp($a[$_]); if( ($date[1]==localtime->mon+1) && ($date[2]==localtime->year+1900) ) { $a[$_]=~s/ $day( |$)/ $day<\/STRONG> /;} $a[$_]=~s/^ //; [split/\s{1,3}/,$a[$_]] }(1..$#a+1); return table({-border=>"1"}, caption(h2($a[0])), Tr({-align=>"CENTER",-valign=>"TOP"}, [ th([@{$b[0]}]), td([@{$b[1]}]), td([@{$b[2]}]), td([@{$b[3]}]), td([@{$b[4]}]), td([@{$b[5]}]) ])); }