programming-examples/perl/CGI/Send image to client.pl
2019-11-15 12:59:38 +01:00

19 lines
210 B
Perl

#!/usr/local/bin/perl
use CGI;
$co = new CGI;
open (IMAGE, "<image.gif");
$size = -s "image.gif";
read IMAGE, $data, $size;
close IMAGE;
print
$co->header(-type=>'image/gif'),
$data;