#!/usr/bin/perl -w use 5.010; use strict; use warnings; use GD::Graph::bars; print"Hello world!\n"; my @data =([1,2,3,4],[5,3,8,9]); my $graph = GD::Graph::bars->new(400,300); $graph->set( x_label => 'X num', y_label => 'Y num', title => 'Test', ) or warn $graph->error; my $myimage = $graph->plot(\@data) or die $graph->error; print "Content-type: image/png\n\n"; print $myimage->png;