#!/usr/bin/perl use strict; my $base_url = 'http://www.zukeran.org/shin/funifuni/'; my %topicindex; my $yyyy; my $mm; my $dd; my $tt; my $current_month; my $current_day; my $current_topic; my $base_url; open(NKF,"|/usr/bin/nkf"); select(NKF); print <<"__EOF__"; shin's page / funifuni __EOF__ # htmlファイルをごりごり読む #

ルービックキューブ

while(<>){ if (/^

([^<]+)<\/a><\/h3>$/) { $topicindex{$3} .= "$2\t"; } } my @topiclist; my @linklist; my $i; my $j; my $date; foreach $i (sort keys %topicindex) { chop $topicindex{$i}; @topiclist = split(/[\t\n]+/,$topicindex{$i}); print "

$i

\n"; @linklist = (); foreach $j (reverse sort @topiclist) { $date = substr($j,0,4) . "/" . substr($j,4,2) . "/" . substr($j,12,2) . "-" . substr($j,15,2); push (@linklist,"
$date"); } print join(',',@linklist); print "\n"; } print <<"__EOF__"; __EOF__ close NKF; exit 0;