#!/usr/local/bin/perl # $Id: image-1.cgi,v 1.1 2004/06/25 17:30:47 zxr400 Exp $ my $imgfile = '../../img/tokyo-tower.jpg'; my $imgsize = (stat($imgfile))[7]; print "Content-type: image/jpeg\n"; print "Content-Length: $imgsize\n"; print "\n"; binmode(STDOUT); open(IN, $imgfile); binmode(IN); while (){ print $_; } close(IN); exit 0;