#!/usr/local/bin/perl -w # # tinstat.pl (C) 1997-2000 Stuart Caie # who posts the most with tin? # this is distributed under the terms of the GNU public license version 2 # use strict; my (%posters, $f, $file); $file = shift @ARGV or '/tmp/.tin_log'; open LOG, $file or die "Can't open tin log '$file' - $!"; map { $f=substr($_,50,-1) unless $f; $posters{substr($_,40,8)}++; } ; close LOG; print "Poster | Articles posted since $first\n"; map { print $_ . ' | ' . $posters{$_} . "\n"; } sort { $posters{$b} <=> $posters{$a} } keys %posters;