Perl scripts that appear in your browser

Quite some time ago I added a uptime script to
one of my web pages. Someone wrote in
saying that when they used the script, the script contents appeared in their browser
instead of the uptime results. At the time, I had no idea what the problem was.
Now I do.

The symptom

If you follow the directions for the uptime script
and then browse to your code, but find that you see this on your browser:

then I’ll bet that you browsed to your website without using a virtual host. I’ll
bet you browsed to the machine first. Then into a directory which contained your
script. That is what causes the problem. Use a URL instead.