open my $file "<", $image_file or die "grr: $!"; # (You shouldn't print the header manually if you use CGI) print "Content-type: image/gif\n\n"; print $_ while <$file>; #### use strict; use warnings; use CGI; use CGI::Carp qw(fatalsToBrowser); my $cgi = CGI->new; print $cgi->header; # use $cgi->header("image/gif") for gifs print $cgi->start_html; print $cgi->table( $cgi->Tr( $cgi->td([ $cgi->img({src=>"blarg"}) )));