#!/usr/bin/perl
use strict;
my $path = "./";
my @pic = ( "a", "b", "c", "d", "e" );
my $ext = "gif";
print "Content-type: image/$ext\\n\\n";
open IMG, $path.$pic[int rand scalar(@pic)].".".$ext;
binmode IMG;
my $buffer;
while( sysread(IMG,$buffer,100) ) {
print $buffer;
}
close( IMG );