Lp. |
Temat |
Data |
Otwórz |
|
';
my ($forum,%count,@list,@rows);
opendir(DIR, $KOM_DIR) or die "Can't opendir $KOM_DIR: $!";
my @messages = reverse(sort(grep { !/^\./ } readdir(DIR)));
closedir(DIR);
foreach $file (@messages) {
($name,$dir,$ext) = fileparse($file,'\..*');
# opendir(DIR, $KOM_DIR) or die "Can't opendir $KOM_DIR: $!";
# while (defined ($file = readdir DIR)) {
# next if $file =~ /^\.\.?$/;
$count = $count + 1;
open (MESS, $KOM_DIR . $file) || die "Can't open $file: $!";
while ($line = ) {
if ($line =~ s/.*color=gray>//gs) {
($data = $line) =~ s/<\/font.*//gs;
}
if ($line =~ s/.*id=phthc>//gs) {
($temat = $line) =~ s/<\/td.*//gs;
}
}
close(MESS);
print '' . $count . ' |
' . $temat . ' |
' . $data . ' |
';
print ' | ';
}
closedir(DIR);
print ' |