#!/opt/gnu/bin/perl
# This script is Copyright 1995, Steven Dick <ssd@mae.engr.ucf.edu>
# Copy this freely, use as you like, but please send me e-mail.

if (@ARGV) {
  $match = join('|',@ARGV);
} else {
  $match = '.';
}

$now = time;
$DBformat = "lllll";

dbmopen(%keys,"/home/system/www/newcounters",666);

while (($key,$val) = each %keys)
{
  next if ($key !~ /$match/);
  ($val,$weekly,$creation,$lastaccess,$lastreset) = unpack($DBformat,$keys{$key});
  $keys{$key} = pack($DBformat,$val,0,$creation,$lastaccess,$now);
}
dbmclose(%keys);
