#!/usr/bin/perl use Fcntl ':flock'; open (FILE,"+; $hits = $hits+1; seek (FILE,0,0); print FILE $hits; flock (FILE,LOCK_UN); close (FILE); print "Content-type: text/plain\n\n"; print $hits;