#!/usr/bin/perl $countfile='count.dat'; if (-e $countfile) { open(START,"$countfile") or die("Could not open"); $counter=; close(START); $counter++; open(COUNT,">$countfile") or die("Could not open"); # Below loop probably isn't needed since the # file is being overwritten but its always cool to # make sure, heh while () { s/[^\d]/ /; if (/(\s)$/) { chomp;  } } print COUNT $counter; close(COUNT); } print "Content-Type: text/html\n\n"; print $counter; exit; ##END