#!/usr/bin/perl #7blosxom.cgi use CGI':all';use File::Find;($p,$y,$m,$d)=grep/^\D+$/,(@i=split'/',path_info), grep/^\d+$/,@i;find sub{($f=$File::Find::name)=~/\.txt$/and $e{$f}=-M},"./$p"; put header,start_html;for(sort{$e{$a}<=>$e{$b}}keys%e){($c,$x,$z)=(localtime( time-86400*$e{$_}))[3..5];if(!($y&&$y!=$z+1900||$m&&$m!=$x+1||$d&&$d!=$c)&&-f&& open F,$_){s/^\.\///;chomp($t=<F>);put h2 a({href=>url."/$_"},$t),pre<F>,hr; close F}}put end_html __END__