#!/usr/bin/perl
# summary.cgi
$filearg = "../../counter/data/lutusp_";
$outstr = "Content-type: text/HTML\n\n";
$outstr .= "\n
\n\n";
$outstr .= "Summary of Page Hits
\n";
$outstr .= "\n";
$outstr .= "Page | Count |
\n";
foreach $fn (<$filearg*>) {
$q = $fn;
$q =~ s/^.*_(.*$)/$1/; # get a title from the filename
open (DATA,$fn);
$count = ;
close DATA;
$count =~ s/\n//g;
$outstr .= "$q | $count |
\n";
}
$outstr .= "
\n\n\n";
print $outstr;