#!/usr/bin/perl use CGI::Carp qw(fatalsToBrowser); use strict; my $adfile = '/home/ebrae2/adskingston-www/cgi-bin/ebrae/data/ads.data'; my $hits_dir = '/home/ebrae2/adskingston-www/cgi-bin/ebrae/hits/'; my $lines; my $counter_file; open(FILE, $adfile) || die "Can't open $adfile"; while ($line = ) { chomp $line; my @counter_file = split(/\|/,$line); open (HITS_FILE, ">$hits_dir/$counter_file[0].txt") || die "Can't create file"; ("$hits_dir/$counter_file[0].txt"); print HITS_FILE "0"; close (HITS_FILE); chmod 0666, "$hits_dir/$counter_file[0].txt"; } close(FILE); chmod 0666, "$adfile"; print "Content-type: text/html\n\n"; print "
"; print "
";