....snip... my $gd = $graph->plot(\@data) or die "Could not plot: ".$graph->error. Dumper(@data); my $img = $gd->png(); $r->content_type("image/png"); $r->send_http_header; binmode STDOUT; $m->print($img); $m->abort(OK); # make sure nothing else gets sent