7blosxom.cgi l10n for Japanese
start_html に -title=>$0 入れると7行に収まらなかった(苦)。

#!/usr/bin/perl
use CGI':all';use File::Find;($Y,$M,$D)=grep/^\d+$/,@i=path_info=~m|/([^/]+)|g;
$R=$i[-1]=~/\.txt$/?pop@i:'\.txt';find sub{($d,$m,$y)=(localtime($t=(stat)[9]))
[3..5];$e{$File::Find::name}=$t if!($Y&&$Y-$y-1900)&!($M&&$M-$m-1)&!($D&&$D-$d)
&/$R$/},$P=join('/','.',grep!/\.\.|^\d+$/,@i);put header(-charset=>$c='EUC-JP')
,start_html(-encoding=>$c,lang,ja);for(sort{$e{$b}<=>$e{$a}}keys%e){open F,$_;
s/^\.//;chomp($h=<F>);put h2(a{href,url.$_},$h),pre<F>,hr}put end_html

>>182
'..' さえ防いだら大丈夫な気も…
既に開かれてるファイルハンドルを open し直すと、開いていたファイルは
close されてから新しいファイルを open するので、close は明示しなくても
可な筈。
http://perldoc.com/perl5.8.0/pod/func/close.html