1|1/27|2002|3|26|19|7|7|21|10|3|34|7|73|undef|71|6|20 2|2/03|2002|3|26|19|8|28|21|10|3|34|7|73|undef|72|6|20 3|2/10|2002|3|24|24|8|28|21|10|3|46|7|73|undef|72|8|20 4|2/17|2002|3|22|23|6|28|21|10|3|46|7|73|undef|72|8|20 5|2/24|2002|3|18|23|6|28|22|10|3|46|38|73|undef|72|8|20 6|3/03|2002|3|13|25|6|36|18|28|9|33|38|44|undef|65|8|20 7|3/10|2002|3|13|35|11|50|22|28|9|33|38|44|undef|65|8|20 #### #!/usr/local/bin/perl5 -wT print "Content-type: text/html\n\n"; $debug = 0; # Set 1 to enable debug; set to 0 to disable. open(HANDLE,"integrate.dat"); while () { chomp; @temp1 = split(/\|/, $_); $domain = unpack ("A5", $temp1[17]); Debug ("$temp1[1]"); # DEBUG BREAK POINT $date .= "$temp1[1] "; $aaa_partners .= "$temp1[4] "; $aaa_arf .= "$temp1[5] "; } close(HANDLE); print $date; print $aaa_partners; print $aaa_arf; sub Debug { if ( $debug ) { my $msg = shift; print $msg, "\n"; } } #### #!/usr/local/bin/perl5 -wT # Declare the stuff we need to use use strict; use CGI; use GD::Graph::linespoints; use constant TITLE => "AAA Days to Integration Average: Line Chart"; my $q = new CGI; my $graph = new GD::Graph::linespoints(600, 300); open(HANDLE,"integrate.dat"); while () { chomp; @temp1 = split(/\|/, $_); $domain = unpack ("A5", $temp1[17]); $date .= "$temp1[1] "; $aaa_partners .= "$temp1[4]"; $aaa_arf .= "$temp1[5]"; } close(HANDLE); my @data = ( [ qw ( $date ) ], [ qw ( $aaa_partners ) ], [ qw ( $aaa_arf ) ], ); $graph->set( title => TITLE, x_label => "Third Quarter FY 2002", y_label => "Average Days", long_ticks => 1, y_max_value => 150, y_min_value => 0, y_tick_number => 10, y_label_skip => 0, bar_spacing => 4, types => [ "linespoints", "linespoints" ], dclrs => [ "red", "black" ], ); $graph->set( markers => [1,1] ); $graph->set_legend( "Partners", "ARF" ); my $gd_image = $graph->plot( \@data ); print $q->header( -type => "image/png", -expires => "-1d" ); binmode STDOUT; print $gd_image->png; get_data(); #### my @data = ( [ qw ( $date ) ], [ qw ( $aaa_partners ) ], [ qw ( $aaa_arf ) ], );