Randy Webb wrote:
I only want to call this script automatically when someone load the
web page.
How can I do this ?
<img src="pathToThePerlScript">
At it's simplest.
It's simpler than possibility: it isn't even valid markup. As soon as
you consider writing an alt attribute, you will (hopefully) stop and
think what should and could be done when the user agent does not
automatically load an image. Note that the user agent might decide not
to load the image even if it is a common visual browser with automatic
image loading disabled, since it notices that the image is already in
its cache (and it might also get it from a proxy cache).
Thus, this rolls back to the question what the original problem is.
Automatic execution of a server-side script sounds like one possible
approach to solving some problem - which?
It is surely much more robust to arrange things so that the page's
address refers to a server-side script. This script can then do whatever
is necessary before sending the browser some HTML document (perhaps
something that the script just picks up from a file). Even then, caching
may complicate things.