programming-examples/perl/CGI/Send image to client.pl

19 lines
210 B
Perl
Raw Normal View History

2019-11-15 12:59:38 +01:00
#!/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;