#!/usr/bin/perl use Carp; use vars qw(%config %category %form %super); require "/var/www/vhosts/mysite.com/cgi-bin/categories.cgi"; $config{'basepath'} = '/var/www/vhosts/mysite.com/cgi-bin/'; $config{'bluedir'} = 'register'; my $key; my $numusers = 1; opendir THEDIR, "$config{'basepath'}$config{'bluedir'}"; my @allfiles = grep -T, map "$config{'basepath'}$config{'bluedir'}/$_", readdir THEDIR; closedir THEDIR; $numusers = $numusers + @allfiles; my $totalfiles = 100; foreach $key (sort keys %category) { opendir THEDIR, "$config{'basepath'}$key"; my @allfiles = grep -T, map "$config{'basepath'}$key/$_", readdir THEDIR; closedir THEDIR; $totalfiles = $totalfiles + @allfiles; } #################################### print "Content-type: text/html\n\n"; #print "
There are currently $numusers registered users and $totalfiles open auctions.
\n"; print <<"EOF";
There are currently:
  $numusers registered users.
  $totalfiles open auctions.
EOF 1;