#!/usr/bin/perl

$GNUPLOT = '/usr/bin/gnuplot';
$PPMTOGIF = '/usr/bin/ppmtogif';

#undef $/;
$|=1;

print "HTTP/1.0 200 OK\n";
print "Content-type: image/gif\n\n";

open (GRAPH,"| $GNUPLOT | $PPMTOGIF") || die ;
print GRAPH <<END;
set term pbm color
plot sin(x)
END

close GRAPH;
