in reply to Using perl in <img src=> scenarios
In other words:
#!/usr/bin/perl -w use strict; # do statistics stuff here print "Location: /partial/url/to/image.jpg\n\n"; # note the starting s +lash [download]