in reply to Using perl in <img src=> scenarios

If you don't want to do an internal redirect (or aren't using Apache) then you can just set the MIME type and output a small image file. (A 1x1 transparent GIF is a good idea.)

#!/usr/bin/perl use strict; use warnings; use CGI; # do statistics stuff... my $q = CGI->new; print $q->header( 'image/gif' ); # slurp file and output local $/; open my $fh, 'tiny_img.gif' or die $!; print <$fh>;