in reply to This might not be in the spirit of iTIMTOWTDI/i, but...

for the last question:
the first script (html) writes:
print q{<img src="/cgi-bin/imgserv.pl">}; ...
the second script (imgserv.pl) writes:
# suppose you have read() an immage into $image_data # and image type is jpeg... print "Content-Type: image/jpeg\n\n"; binmode STDOUT; #just if you are unde windows #not needed on more serious platforms :-) print $image_data;