in reply to Re: (jeffa) Re: HTML calendar w/dates = links
in thread HTML calendar w/dates = links

Piece of cake, but you might want to read up on perlman:perldsc first. This example also takes care of new years too:
use CGI qw(header); use HTML::CalendarMonthSimple; use strict; my %cal; while (<DATA>) { chomp; my ($file,$yyyy,$mm,$dd) = /([^.]+)\.(\d{4})(\d\d)(\d\d)/; push @{$cal{$yyyy}->{$mm}},{day => $dd, targ => $file}; } print header; for my $year (sort keys %cal) { for my $mon (sort keys %{$cal{$year}}) { my $cal = HTML::CalendarMonthSimple->new( month => $mon, year => $year, ); for (sort @{$cal{$year}->{$mon}}) { $cal->setdatehref(int($_->{day}), $_->{targ}); } print $cal->as_HTML(); } } __DATA__ file5.20030227 file2.20020802 file1.20020801 file4.20021015 file3.20020803

jeffa

L-LL-L--L-LL-L--L-LL-L--
-R--R-RR-R--R-RR-R--R-RR
B--B--B--B--B--B--B--B--
H---H---H---H---H---H---
(the triplet paradiddle with high-hat)