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