>505
過去ログの番号を past_oneサブルーチンに渡していないようですね。
過去ログ1ページ目が上手くいくのは
if (!$in{'pastlog'}) { $in{'pastlog'} = $no; }
のおかげ。

1713行目
× $script?mode=past_one&no=$no
○ $script?mode=past_one&no=$no&pastlog=$in{'pastlog'}


>>558
while (<IN>) { ... }
while (defined($_ = <IN>)) { ... }
この二つは等価ですよ。
http://www.perldoc.com/perl5.8.0/pod/perlop.html#I-O-Operators