use File::Copy; print "Content-type: image/jpeg\n\n"; copy "/path/to/image.jpeg", \*STDOUT;