The previous posters have covered most of the bases.
When you go to try and debug this, keep in mind these
specific things to watch/look for:
- The background attribute for the td
element should probably be something more like
"/images/$background[$cnt]", unless you are certain
that the pages using this script (it's clearly an SSI
utility) will always be in the directory above that images
directory.
- Check the actual path to the counter-file. Or use the
File::CounterFile module. The cgi-bin directory might
not be where you want this file getting opened.
- Check the UID/GID that the CGI application is running
under. Running the script from the command-line as yourself
isn't the same as having it run as a CGI under the UID of
the web server's process.
--rjray