[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [cobalt-users] invisible counter doesn't work



On Thu, 27 Jul 2000, Jeff Lasman wrote:

> Well, I always thought I could make any cgi script work <frown>.
> 
> I'm trying count.cgi from "http://www.shavenferret.com/scripts/";.
> 
> It works (when called from an .shtml file).  but it gives me an error on
> the screen every time it works <frown>.

hmm, works when i played with it, but you have to take the CR's out of it,
seems to have been written on a dosish machine...

> 
> Anyone know why?  Or have an invisible counter I can use?

here's a much simpler one....

#!/usr/local/bin/perl
open (COUNT, "countfile");   # open "countf" counter file
$counter = <COUNT>;          # input value from file
close (COUNT);               # close file (primarily "re-set")
open (COUNT, ">countfile");  # open "countf" for 'output'
print COUNT +($counter+1);   # increment value of counter
close (COUNT);               # close file
print $counter;              # put the value on the page

(just take thew prine line out for it to be invisible)

g.