use CGI; my $cgi = CGI->new; $|=1; print $cgi->header(-type=>"image/jpeg",-charset=>""); binmode(STDOUT); print STDOUT $BLOB;